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