plot and hist in matlab

조회 수: 2 (최근 30일)
reem
reem 2011년 4월 7일
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

채택된 답변

Matt Fig
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
Matt Fig 2011년 4월 7일
Does the second hist cover up the first? Try hist(True_probability,x) first, then doing hist(proestimated,x).
reem
reem 2011년 4월 7일
I do that but nothing is changed
the same result appeared

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by