How to boxplot cell array with different length in a single figure
Mostrar comentarios más antiguos
%%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 comentario
Philipp Fischer
el 9 de Ag. de 2016
Respuestas (0)
Categorías
Más información sobre Box Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!