How to do a boxplot for three samples of different sizes?

134 visualizaciones (últimos 30 días)
MC3105
MC3105 el 1 de Dic. de 2014
Respondida: Thorsten el 1 de Dic. de 2014
Hey everyone,
I am trying to create a boxplot for errors values of three different models. Each error vector has a different size. On the internet I already found a solution for integrating two vectors of different sizes into one boxplot:
x = randn(600,1);
y = randn(1440,1);
z = [x; y];
g = [zeros(length(x),1); ones(length(y),1)];
boxplot(z,g);
Is there a way to to this for three vectors??

Respuesta aceptada

Thorsten
Thorsten el 1 de Dic. de 2014
x1 = randn(600,1);
x2 = randn(1440,1);
x3 = randn(500, 1);
x = [x1; x2; x3];
g = [zeros(length(x1), 1); ones(length(x2), 1); 2*ones(length(x3), 1)];
boxplot(x, g)

Más respuestas (0)

Categorías

Más información sobre Colormaps 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