0todd0000/spm1dmatlab

Error in 'inference' Method: "The value of 'two_tailed' is invalid. It must satisfy the function: islogical. "

Closed this issue · 2 comments

I tried to make a preliminary analysis of my preprocessed EEG data and have the same format and code as is shown in this tutorial video: https://youtu.be/nKyNpoU6-_I?feature=shared

However, Matlab returns an error after line 2, because it thinks that the argument for 'two_tailed' is not logical, even though I just used the normal true function. Alternatives like 1 or logical(1) return the same result.

These are my commands:

spm              = spm1d.stats.ttest_paired(df_cond_sMAS, df_cond_mMAS);    % works fine
spmi             = spm.inference('alpha', 0.05, 'two_tailed', true);     % returns error
spm_plot      = spmi.plot();    % not executed

I appreciate any ideas as I find this is a rather strange error.
Thanks and all the best,
Leonard

Hello Leonard,

Perhaps try without the 'alpha' keyword.

spmi = spm.inference(0.05, 'two_tailed', true);

Regards
Mark

Hello Mark,

thank you so much, for whatever reason it worked! So this was solved much faster and easier than feared.

Hello Leonard,

Perhaps try without the 'alpha' keyword.

spmi = spm.inference(0.05, 'two_tailed', true);

Regards Mark