off figure in matlab

9 ビュー (過去 30 日間)
Cside
Cside 2019 年 10 月 12 日
回答済み: Rik 2019 年 10 月 12 日
Hi i have this code but I do not wish for the figures of anova to appear. I tried to input 'off' in that line but was returned with "Error using anova1 (line 93) X and GROUP must have the same length". How should i debug this? Thank you!
p = zeros (1,3);
for n = 1:3
dataset_fef_sac_5_n = dataset_fef_sac_5(n,:);
%%toreplicate into 8 rows
testdata_n = repmat(dataset_fef_sac_5_n, 8,1);
fef_n = testdata_n.*ix;
%%to Nan only those in ixCopy, not actual 0 values in dataset
fef_n (ix ==0) = NaN;
%%transpose pfc_n for anova to work
[~,table] = anova1(fef_n', 'off');
pvalue(n) = table{2,6};
end

採用された回答

Rik
Rik 2019 年 10 月 12 日
You need to define a group array if you want to use the off switch. The documentation states "anova1 treats each column of y as a separate group". That should provide you with enough information to generate the appropriate group variable.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by