Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Undefined function or variable 'slm'. = QUICK HELP!

Asked by Sooyun Cho on 27 Aug 2013

Hi, all. I'm trying to compare the cortical thickness of normal brains and MCI brains. In the BIC website, they provided me with a step-by-step tutorial for the calculation. However, even when I did do exactly what they've told me to do, this message "Undefined function or variable 'slm'." keeps on showing up. These are the codes that I've typed into the command box:

>> %Creating the matrix of data.

[SubjectNum, NMCI, ThickFileLeft, ThickFileRight]=textread('ADNI45.csv', ' %s %s %s %s');

>> %Create terms

NMCI = term (NMCI);

>> %% 1 You are now ready to create your model and to estimate it

Y = 1 + NMCI;

--> till here everything works well, and all of the sudden when I type

>> %To get your t statistic for group

contrast_direction1 = NMCI.N - NMCI.MCI;

slm_direction1 = SurfStatT ( slm, contrast_direction1);

---> "Undefined function or variable 'slm'." message shows in red. What did I do wrong and how do I fix it? Help please!

Alicia.

0 Comments

Sooyun Cho

Products

No products are associated with this question.

1 Answer

Answer by Jan on 27 Aug 2013

The error message quite correctly states, that you never defined the variable slm before you try to use it as an argument for the function SurfStatT. As I am not familiar with the framework you are using, I'm affraid it's difficult to guess a correct initilization for slm. You will have to look at the function definition of SurfStatT to understand how to use it correctly.

0 Comments

Jan

Contact us