Create boxplots from multistructure cell
Afficher commentaires plus anciens
Dear all, I am trying to create a matrix that stores boxplots of various parameters that have been estimated and stored in a cell which contains a 5x100 array of structures, each of which basically contain the same name of parameters, but have been estimated using a different number of simulations, respectively.
This is a preview of the structure:


So now I am simply trying to create a matrix which gives me boxplots for each of the parameters of interest, for each asset (total of 30), and then obviously for each number of simulation.
Here was my starting point:
TTAll=[100 250 500 1000 2000];
S=length(TTAll); % do the simulation 100 times (Marc)
S1=100;
box = cell(S,S1);
df0 = zeros(S,S1); df = zeros(S,S1);
scale = zeros(S,S1); c0 = zeros(S,S1);
c1 = zeros(S,S1); d1 = zeros(S,S1); R=zeros(S,S1);
box.k0 = df0; box.k = df; box.scale = scale; box.c0 = c0;
box.c1 = c1; box.d1 = d1; box.R = R;
for j = 1:length(TTAll)
% TT=TTAll(j);
for j1 = 1:S1
box{j,j1}.k0(:,:) = boxplot(param_cop_garch{j,j1}.df(1,:),'plotstyle','compact');
end
end
This gives me the following error: Cell contents assignment to a non-cell array object.
What am I doing wrong or not considering when trying to specify the boxplot matrix?
Best regards,
Julian
Réponses (1)
Constantino Carlos Reyes-Aldasoro
le 3 Déc 2020
0 votes
Have you considered using 3D boxplots?
Have a look here:
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!