Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Statistical Analyses Across Structures

1 visualizzazione (ultimi 30 giorni)
Alex Borg
Alex Borg il 23 Set 2020
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Hello everyone:
I have created a structure, and I'd like to perform some analyses about it. The structure may not be formatted most ideally, but that isn't what I'm most concerned with (unless it should be).
S(1), S(2), S(3), and S(4) represent four trials of a simulation. I'd like to perform statistical analysis across simulations (say, four boxplots, one for each of the "time" columns).
I tried converting this large structure to a table, then using grpstats, but that seems more trouble than it's worth. Any suggestions would be greatly appreciated!

Risposte (1)

Star Strider
Star Strider il 24 Set 2020
I am not certain what you want to do.
For the boxplot, try this:
D = load('structure.mat');
S = D.S;
for k1 = 1:numel(S)
for k2 = 1:numel(S(1).s)
t(k1,k2) = S(k1).s(k2).time;
end
end
figure
boxplot(t.')
grid
xlabel('S')
ylabel('time')
figure
boxplot(t)
xlabel('time')
ylabel('S')
Fh = gcf;
pos = Fh.OuterPosition;
Fh.OuterPosition = pos + [0 -500 750 500];
The loop was necessary to recover the information from your structure.
I have no idea what you are doing, so I likely cannot help on any further statistical analyses.

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by