markallenthornton / MatlabTFCE

Standalone MATLAB implementation of permutation TFCE correction
MIT License
42 stars 21 forks source link

output images from two-tail test of one-way t-tests (matlab_TFCE) #7

Closed gargiris closed 5 years ago

gargiris commented 5 years ago

Hello,

I have a question regarding the image output when using the function "matlab_TFCE" with analysis "oneway". As I understand from the documentation, there should be two images as output (one for the negative tail and one for the positive tail): % If tails == 2, two such output images will be returned, one for the % 'positive' tail and one for the 'negative' tail of the test, % respectively. However, when I run the function, only one output image is produced. Can you help me with this? Thank you very much.

Georgette

markallenthornton commented 5 years ago

Hi Georgette,

For the 'onesample' analysis option, you should indeed get two output images, as the documentation describes. Are you using the following syntax?

[pcorr_pos,pcorr_neg] = matlab_tfce(analysis,2,imgs,imgs2,covariate,nperm,H,E,C,dh,parworkers,nuisance)

It's important to "catch" both outputs with the "[pcorr_pos,pcorr_neg] =" bit of the code. The output to a single variable seems like the likely reason you might be experiencing this issue.

Best, Mark