Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Statistical Analyses Across Structures

조회 수: 1 (최근 30일)
Alex Borg
Alex Borg 2020년 9월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
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!

답변 (1개)

Star Strider
Star Strider 2020년 9월 24일
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.

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by