Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1467
Number of posts: 2144

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Matlab, cell arrays Posted by Krot_krot on 27 Apr 2011 at 3:48 PM
Hi Matlab community
I desperately need help with matlab.

My data are stored as cell arrays (1x48 cells)(please, see attachment). Each cell contains 5 cells {1,1}, {1,2}...{1,5}.
Cells {1,1} contains image name and {1,3} contains onsets time.
I need to create a simple matrix in matlab with 6 columns (each column for each TYPE of image. Since there are 6 types of images: image1, image 2, image3..so there should be 6 columns) containing onsets for corresponding image.

to load this file in matlab I used two lines and formula:

clear all
uiopen('subjfmri1_1.res',1);

function field = loadlogfile( filename )
%

fid = fopen( filename );
if fid == -1
error( [ 'cannot open file ' filename ] );
end

text = fgetl( fid );
row = 1;

while ~isnumeric(text)
field{row} = getfields(text);
row = row + 1;
text = fgetl( fid );
end

fclose( fid );
eventMatrix=loadlogfile('subjfmri1_1.res');

I would be very pleased for any help or suggestions
thank you in advance
Attachment: subjfmri1_1.zip (961 Bytes | downloaded 56 times)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.