From: Jason Garcia on
Does anyone know how to set up a series of boxplots within the same plot when the data of column vectors is of different dimensions? (Not subplot)

Ex: 600x1 and 1440x1 column vectors
From: us on
"Jason Garcia" <jason.garcia24(a)gmail.com> wrote in message <i2pa3k$jc3$1(a)fred.mathworks.com>...
> Does anyone know how to set up a series of boxplots within the same plot when the data of column vectors is of different dimensions? (Not subplot)
>
> Ex: 600x1 and 1440x1 column vectors

a hint:
- fill missing values with NANs...

us
From: Peter Perkins on
On 7/28/2010 9:08 AM, Jason Garcia wrote:
> Does anyone know how to set up a series of boxplots within the same plot
> when the data of column vectors is of different dimensions? (Not subplot)
>
> Ex: 600x1 and 1440x1 column vectors

Jason, I think what you're looking for is this:

>> help boxplot
[snip]
BOXPLOT(X,G) specifies one or more grouping variables G, producing a
separate box for each set of X values sharing the same G value or
values.

So,
x = randn(600,1);
y = randn(1440,1);
z = [x; y];
g = [zeros(length(x),1); ones(length(y),1)];
boxplot(z,g);