Trouble Plotting SPM1D Paired t-Test Results in MATLAB: 'Unrecognized Method' Warning

25 次查看(过去 30 天)
I have installed SPM version 12, and subsequently, I installed spm1d version M.0.4.10 (dated September 23, 2022). I used the following code to perform a paired t-test:
spm = spm1d.stats.ttest_paired(Ext_D, Ext_F);
spmi = spm.inference(0.05, 'two_tailed', true);
spm.plot();
The spmi object is successfully created, but when I attempt to plot it in MATLAB, I encounter a warning: 'Unrecognized method, property, or field 'plot' for class 'spm1d.stats.spm.SPM0D'.'
I'm seeking assistance to resolve this issue. Can someone please help me?

采纳的回答

Takeda Ryutaro
Takeda Ryutaro 2023-9-27
Sorry, I posted this in the comments section by mistake.
spm1d.plot.plot_meanSD(YA,'color','r');
hold on;
spm1d.plot.plot_meanSD(YB,'color','b');
title('Data','FontSize',18);
legend({'YA','YA SD','YB','YB SD'});
%(1) Conduct SPM analysis:
spm = spm1d.stats.ttest2(YA, YB);
spmi = spm.inference(0.05, 'two_tailed',true, 'interp',true);
% disp(spmi);
%(2) Plot:
subplot(1,2,2);
spmi.plot();
spmi.plot_threshold_label();
spmi.plot_p_values();
title('SPM analysis','FontSize',18);
  4 个评论
Takeda Ryutaro
Takeda Ryutaro 2023-10-4
Hi!
Seeing your data, you data size is [250,1].
Does the row represent time point?
If you want to do SPM1d, the size of the data should be [subject, timepoint].

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by