大量のファイルをインプットするコードを簡潔に書くことは可能でしょうか?
Afficher commentaires plus anciens
nrun = 1; % enter the number of runs here
jobfile = {'C:\0spm Caltech\normalization_job.m'};
jobs = repmat(jobfile, 1, nrun);
inputs = cell(2, nrun);
for crun = 1:nrun
inputs{1, crun} ={'C:\0spm Caltech\data\0051456\meanrest.nii,1'};
inputs{2, crun} = {'C:\0spm Caltech\data\0051456\rrest.nii,1'
'C:\0spm Caltech\data\0051456\rrest.nii,2'
'C:\0spm Caltech\data\0051456\rrest.nii,3'};
end
spm('defaults', 'FMRI');
spm_jobman('run', jobs, inputs{:});
ファイルをインプットするために
上記のコードでは3個のファイルを読みこんでいますが、
150個のファイルを読みこむ方法を教えていただきたいです。
'C:\0spm Caltech\data\0051456\rrest.nii,150'までのファイルを読みこむ必要があります。
よろしくお願いします。
Réponse acceptée
Plus de réponses (1)
YASUNORI HAMAGUCHI
le 11 Déc 2019
0 votes
2 commentaires
michio
le 11 Déc 2019
コードに気になる点は特に見当たらないですが、、エラーメッセージなどあるともしかしたら・・。spm 特有の何かに起因しているのであれば、私には経験が無いので他の方のコメントを待ちましょう。
YASUNORI HAMAGUCHI
le 11 Déc 2019
Catégories
En savoir plus sur Neuroimaging dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!