Multimodal Integration of M/EEG and f/MRI Data in SPM12

1 回表示 (過去 30 日間)
Ingmar Bonhoffer
Ingmar Bonhoffer 2021 年 5 月 11 日
回答済み: Amrtanshu Raj 2021 年 6 月 25 日
Hi, I'm trying to run through the analysis steps for Richard Henderson's 'Multimodal Integration of M/EEG and f/MRI Data in SPM12' dataset. It instructs to use the following script to create subdirectories for all subjects:
BIDS = spm_BIDS('C:\Users\ibonh\Desktop\Henderson_Prac');
subs = spm_BIDS(BIDS,'subjects', 'task', 'facerecognition');
nsub = numel(subs);
subdir = cellfun(s) [(@'sub-' s], subs, 'UniformOutput',false]; %#ok<NOPTS>
spm-mkdir('C:\Users\ibonh\Desktop\Henderson_Prac', {'meg','func'});
spm_mkdir('C:\Users\ibonh\Desktop\Henderson_Prac',subdir, {'meg','anat','func'});
When I try to run the script the following error message appears;
Error: File: Subdir.m Line: 4 Column: 21
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
Hoping you can help

回答 (1 件)

Amrtanshu Raj
Amrtanshu Raj 2021 年 6 月 25 日
Hi,
Your syntax for in the line 4 is incorrect. The correct syntax can be found here.
Assuming in your case if sub is the function then.
subdir = cellfun(@sub, subs, 'UniformOutput',false); %#ok<NOPTS>
Hope it helps !!

カテゴリ

Help Center および File ExchangeMRI についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by