Borrar filtros
Borrar filtros

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

36 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Takeda Ryutaro
Takeda Ryutaro el 27 de Sept. de 2023
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 comentarios
Takeda Ryutaro
Takeda Ryutaro el 4 de Oct. de 2023
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].

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by