Anova 1 results into a matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
Michal
2019년 10월 7일
Hi,
it depends on what results you would like to get.
You can get the full ANOVA table from anova1 as a cell array.
[~,table] = anova1(y)
Then you can simply store each ANOVA table in a cell array.
for i = 1:number_of_loops % number_of_loops should be equal to how many loops you want to run
[~,table] = anova1(y);
all_results{i} = table;
end
If you would like to get just one result from the ANOVA table you can store it in a matrix in a similar way to the above. Let's say you are interested in the F statistic:
for i = 1:number_of_loops % number_of_loops should be equal to how many loops you want to run
[~,table] = anova1(y);
F_statistic(i) = table{2,5}; % make sure you check that the F statistic of your ANOVA can be found at those indices - (2,5)
end
You can easily work out indices of any of the results by looking at the ANOVA table.
Hope this helps.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 ANOVA에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!