How to append new data to a box and whisker plot

6 visualizaciones (últimos 30 días)
EL
EL el 21 de Sept. de 2019
Respondida: dpb el 27 de Sept. de 2019
Hello!
I have 3 seperate "***_01.mat" files, each with a vector with the same name, 'v', which contains an series of numbers. If I type the following, I get a single boxplot
plot(v{1})l
I need to grab the first .m file, '***_01.mat', extract the 'v' variable, and plot it in the box plot with the x-axis label '1'
then, i need to clear 'v'. Then load the 'v' variable from ***_02.mat, and plot it in the box plot with the x-axis label '2'.
This would need to go onto set 3
How would I go about this?\
Thanks!

Respuestas (1)

dpb
dpb el 27 de Sept. de 2019
d=dir('*_01.mat');
v=[];
for i=1:length(d)
V=[v load(d(i).name)];
end
V=cell2mat(V);
boxplot(V)
from what you've told us and some guesses as to what might be true about what you didn't...

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by