Dear All,
I'm having trouble where I need to pull a number using P%0.2d, I think the issue is that P%0.2d doesn't start right after sprintf.
I've omited some of my file names because it is not relevant to solve the issue.
Participant=[1,2 ,3];
for ppt=1:numel(Participant);
oSubj=Participant(ppt);
D = spm_eeg_load ('filename',sprintf('XXX to XXX_XXX_P%0.2d_XXX_removed XXX_XXX.dat', oSubj),'filepath','C:\Matlab_DataX\fulldataX\');
end
Best Answer