plot and hist in matlab

1 visualización (últimos 30 días)
reem
reem el 7 de Abr. de 2011
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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Bar Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by