Dear Theresa,
you are right, renaming is not the way to do it. You should follow the
hints by
Darren and save the created variables into a .mat file, instead of saving the
MATLAB program code that creates them into .m file (which is what you did).
Volkmar
Zitat von "Pape, Theresa" <[log in to unmask]>:
> Darren
> Thank you for your suggestions. I tried what you suggest below and I am
> still not getting the matlab file to successfully load into SPM 5. I
> renamed the file by highlighting the file, right clicking on the mouse,
> selecting rename, typing in mutipleconditions.mat
>
> The renaming of the matlab file (as evidenced by the attached file)is
> probably the culprit. How do I get rid of the suffix (.m). Does anyone
> know? I have tried multiple re-anming strategies---I would appreciate
> any suggestions. Thank you all again. Theresa Pape
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [log in to unmask] [mailto:[log in to unmask]]
> Sent: Thursday, December 28, 2006 1:03 PM
> To: Pape, Theresa
> Cc: [log in to unmask]
> Subject: Re: [SPM] multiple conditions feature of SPM5
>
> Theresa:
>
> the variables should be called names (not Names), onsets and durations.
>
> if you don't want matlab to print out every variable it loads then use a
> semicolon and not a comma
> to terminate each statement (not just at the end of a line containing
> multiple statements).
>
> for example:
>
> Names{1}='NFV SON'; onsets{1}=[149 276 611]; durations{1}=[31 31 31];
>
> or
> Names{1}='NFV SON';
> onsets{1}=[149 276 611];
> durations{1}=[31 31 31];
>
> whatever you find easier to read.
>
> you are correct that you must save all the variables in a .mat file. SPM
> will not load the .m file
> for multiple conditions.
>
> you do not need an end statement.
>
> you should add a last line to save the variables (but make sure you
> don't overwrite other files of
> the same name).
>
> save('multipleconditions.mat','names','onsets','durations')
>
>
> Otherwise it seems fine.
>
> darren
>
> ==============Original message text===============
> On Thu, 28 Dec 2006 12:52:06 pm CST "Pape, Theresa" wrote:
>
> Dear Experts
>
> I am just starting to learn SPM5 (Former SPM2 user) and I use Matlab
> version 7.1. I am trying to use the Multiple Conditions Feature/option
> of SPM5 and I can't seem to get my matlab file to load successfully. I
> was wondering if anyone could tell me what I am doing wrong with my
> matlab file. I appreciate any suggestions. I have saved the file as
> multipleconditions.mat (If I save it as a m-file then SPM5 does not seem
> to recognize it) and the file currently reads as:
>
>
>
>
>
> Names{1}='NFV SON', onsets{1}=[149 276 611], durations{1}=[31 31 31];
>
> Names{2}='FV SON', onsets{2}=427 851 1122 1506, durations{2}=[34 34 34
> 34];
>
> Names{3}='NFV Lang', onsets{3}= [427 851 1122 1506], durations{3}=[33 59
> 40 37];
>
> Names{4}='FV Lang', onsets{4}= [75 210 915 1246], durations{4}=[44 36
> 17 43];
>
> Names{5}='Whistle', onsets{5}=[672 821 1319 1570], durations{5}=[30 30
> 30 30];
>
> Names{6}='Click', onsets{6}=[307 367 551 992], durations{6}=[30 30 30
> 30];
>
> Names{7}='Bell', onsets{7}=[491 932 1186 1446], durations{7}=[30 30 30
> 30];
>
> Names{8}='Silence/Rest', onsets{8}=[45 119 180 246 337 397 461 521 581
> 642 702 791 885 962 1022 1092 1156 1216 1289 1349 1416 1476 1540 1600],
> durations{7}=[30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
> 30 30 30 30 30];
>
> end;
>
>
>
>
>
>
>
> Thank you
>
> Theresa Pape
>
> ===========End of original message text===========
>
>
>
> --------------------------------
> Darren R. Gitelman, M.D.
> Department of Neurology
> Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL
> 60611
> Voice: (312) 908-9023 Fax: (312) 908-8789
> --------------------------------
>
>
|