From: Daniel on 27 Jun 2010 07:33 Hi there, I'm sure that this question has a simple answer, but, as a neophyte Matlab user, I cannot find it easily! I have a three-column Excel file; one column is text labels (experimental conditions, all of which occur repeatedly throughout the column) and the other two are decimal data (stimuli onsets and durations in seconds associated with these conditions). I need to use these data to create a .mat file comprising three cell arrays, according to the following rules (extract from SPM software manual): "You will need to create a *.mat file containing the relevant information. This *.mat file must include the following cell arrays: names, onsets and durations eg. names{2}='SSent-DSpeak', onsets{2}=[3 5 19 222], durations{2}=[0 0 0 0] contain the required details of the second condition. These cell arrays may be made available by your stimulus delivery program eg. CO- GENT. The duration vectors can contain a single entry if the durations are identical for all events." Can anyone give me a 'Dummies Guide' to creating such a file? Thanks in anticipation, Dan
From: Faraz Afzal on 27 Jun 2010 08:03 "Daniel " <daniel.bishop(a)brunel.ac.uk> wrote in message <i07ctg$h2u$1(a)fred.mathworks.com>... > Hi there, > > I'm sure that this question has a simple answer, but, as a neophyte Matlab user, I cannot find it easily! > > I have a three-column Excel file; one column is text labels (experimental conditions, all of which occur repeatedly throughout the column) and the other two are decimal data (stimuli onsets and durations in seconds associated with these conditions). I need to use these data to create a .mat file comprising three cell arrays, according to the following rules (extract from SPM software manual): > > "You will need to create a *.mat file containing the relevant information. This *.mat file must > include the following cell arrays: names, onsets and durations eg. names{2}='SSent-DSpeak', > onsets{2}=[3 5 19 222], durations{2}=[0 0 0 0] contain the required details of the second > condition. These cell arrays may be made available by your stimulus delivery program eg. CO- > GENT. The duration vectors can contain a single entry if the durations are identical for all > events." > > Can anyone give me a 'Dummies Guide' to creating such a file? > > Thanks in anticipation, > > Dan Hi Danny There goes a dummies guide to create *.mat files which are default MATlab variable saving files.. To understand it completely all you have to do is to follow these two steps.. in the command window type 1. doc save (it will start with all the options and ways to save the variables from workspace in any format.) 2. After you are done with reading and then scrolling down to see an example, at the end of this page you will see a blue link that says "exporting to MAT files" Read that and look the example. Apply it to your work and you are done.. I hope it helps. Let me know if it worked !!! Regards, Faraz
|
Pages: 1 Prev: Problem with difference equation Next: automaticaly save figures |