probplot and hold on

How can I plot more than two "probplot" in one graph? I used "hold on" but it doesn't work. It only shows the last graph. And also please help me about using probplot in for loop, to draw in one graph.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 4 de En. de 2013

1 voto

x1 = wblrnd(3,3,100,1);
x2 = raylrnd(3,100,1);
x3 = raylrnd(3,100,1);
probplot('weibull',[x1 x2 x3])

4 comentarios

Bum
Bum el 4 de En. de 2013
Thanks. What if x dataset is very large? For example more than 100. How can I use for loop?
Azzi Abdelmalek
Azzi Abdelmalek el 4 de En. de 2013
y=[]
for k=1:5
x=wblrnd(3,3,100,1);
y=[y x]
end
probplot(y)
Tom Lane
Tom Lane el 4 de En. de 2013
Editada: Tom Lane el 4 de En. de 2013
It is also possible to do
h = probplot(gca,x2)
to add x2 to an existing probability plot. This has the advantage that the x vectors don't need to have the same length. The disadvantage is that you'll want to change the color using h, to be different from the color of the stuff already on the plot.
Azzi Abdelmalek
Azzi Abdelmalek el 4 de En. de 2013
Editada: Azzi Abdelmalek el 4 de En. de 2013
Exact, you can also set different color
h=probplot(gca,x2);
set(h,'color','g')

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by