How to boxplot cell array with different length in a single figure
Afficher commentaires plus anciens
%%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 commentaire
Philipp Fischer
le 9 Août 2016
Réponses (0)
Catégories
En savoir plus sur Box Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!