How to boxplot cell array with different length in a single figure
Ältere Kommentare anzeigen
%%This is what i found. But for my approach I am not able to group the data
ZellA= cell(1,2);
ZellA{1,1} = [1; 2; 3; 4 ];
ZellA{1,2} = [1; 2; 3];
if true
% code
end
G = [cell2mat(ZellA(1,1)); cell2mat(ZellA(1,2))]; % Grouping data
B = [ones(1,length(cell2mat(ZellA(1,1)))), ones(1,length(cell2mat(ZellA(1,2))))+1]
B = B(:)
figure;
boxplot(G,B);
%%My apporach
figure;
hold on;
for i = 1 : length(ZellA)
boxplot(cell2mat(ZellA(i)),i);
end
1 Kommentar
Philipp Fischer
am 9 Aug. 2016
Antworten (0)
Kategorien
Mehr zu Box Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!