How to append new data to a box and whisker plot
2 ビュー (過去 30 日間)
古いコメントを表示
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!
0 件のコメント
回答 (1 件)
dpb
2019 年 9 月 27 日
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...
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!