plot and hist in matlab
2 次查看(过去 30 天)
显示 更早的评论
please anybody answer me How can I get two plot in one graph using bar or hist or plot
and how can I use ((hold and grid command)) with plot and hist
Thanks in advance
0 个评论
采纳的回答
Matt Fig
2011-4-7
Two histograms:
x = -2.9:0.1:2.9;
y = randn(10000,1);
hist(y,x)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w')
z = randn(size(y))/3;
hold on % make sure next one shows up.
hist(z,x)
5 个评论
Matt Fig
2011-4-7
Does the second hist cover up the first? Try hist(True_probability,x) first, then doing hist(proestimated,x).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!