Asked by Jenny
on 17 Nov 2012

I have 10 vectors of temperature data, all different lengths, that I want to make boxplots of and plot them all in the same figure window. How do I do this?

*No products are associated with this question.*

Answer by Tom Lane
on 19 Nov 2012

Here's how to do that with three vectors of different lengths:

x1 = rand(10,1); x2 = 2*rand(15,1); x3 = randn(30,1); x = [x1;x2;x3]; g = [ones(size(x1)); 2*ones(size(x2)); 3*ones(size(x3))]; boxplot(x,g)

Answer by Akiva Gordon
on 17 Nov 2012

Are you familiar with the SUBPLOT function? This may be what you are looking for…

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 0 Comments