trialdata = dlmread(filename,'\t',[1 0 1000 13]); trialdata(:,2) = []; % second column seems to have a zero-indexed trial number, remove it
trialdata(:,1) = trialdata(:,1) - min(trialdata(:,1)); trialdata(:,1) = trialdata(:,1) * 1000; trialdata = [zeros(size(trialdata,1),1)+trialno trialdata];
I have the code above for reading from the file but I get the error :
Error using dlmread (line 147)Mismatch between file and format character vector.Trouble reading 'Numeric' field from file (row number 255, field number 15) ==> time trialcursorx cursory hand_x hand_Y rotationstep targetangle targetposx targetposy garagelocation garageposx garageposy \nError in GUIpreparation (line 39) trialdata = dlmread(filename,'\t',[1 0 1000 13]);
I understand the error but why is it even looking at field 15 in the first place? shouldn't it just be ignored?
Best Answer