Quantcast
Channel: NITRC CONN : functional connectivity toolbox Forum: help
Viewing all articles
Browse latest Browse all 6860

RE: Second level analysis - batch

$
0
0
Hi Alfonso,

Thanks a lot for the advice. In an attempt to make it easier to run and eventually rerun I've been trying to create a script that can just take the structural and function files from there folders for each subject and I was wondering if there is a a way to write sessions for the files in a script?[code]
cwd=pwd;[/code][code]FUNCTIONAL_FILE=cellstr(conn_dir('f*.nii'));
STRUCTURAL_FILE=cellstr(conn_dir('s*.nii'));[/code][code]% Setting other variables
NSUBJECTS = length(STRUCTURAL_FILE);[/code][code]
nsessions=length(FUNCTIONAL_FILE)/NSUBJECTS; % Is it here?[/code][code]FUNCTIONAL_FILE=reshape(FUNCTIONAL_FILE,[NSUBJECTS,nsessions]);[/code][code]
STRUCTURAL_FILE={STRUCTURAL_FILE{1:NSUBJECTS}};
disp([num2str(size(FUNCTIONAL_FILE,1)),' subjects']);
disp([num2str(size(FUNCTIONAL_FILE,2)),' sessions']);[/code]
Best,

Eric

Viewing all articles
Browse latest Browse all 6860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>