12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- %Repairing p05 -> Outfile was corrupted and all values was codes as
- %characters. This was especially problematic for rotations.
- clear all
- mainfolder='/LindeDomingoJuan/Memoreye_DATA/'
- partis_sub= [{'p33_trimmed'}]
- partis_sub2= [{'p33'}]
- % 05 I need to recue this participant data (outputfile as Character,
- % problems with rotations
- %%
- fulldataset =[];
- for ppp=1:length(partis_sub)
- % Loading dataset
- subtable=[];
- sub = tdfread([mainfolder '/logfiles/resultfile_' partis_sub{ppp,:} '.txt'],'tab'); %Logfile for this participant
- subtable=struct2table(sub);
- load([mainfolder '/sequences/m_sequence_' partis_sub2{ppp,:} '.mat']); %Logfile for this participant
- %Removing first presentation of block 3 and second header
- % subtable_b=subtable([1:96 138:617],:);
- % %Info that need to be change from str 2 num
- name_header=subtable.Properties.VariableNames'
- % to_change=[0;0;0;0;1;1;1;0;1;1;0;0;1;1;1;1;1;1;1;0;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1];
- to_change=[0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;0;0;1;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0]
- subtable_c=[];
- for nnn=1:size(name_header,1)
- if to_change(nnn)==1
- toeval= ['subtable_c.' name_header{nnn} '=str2num(subtable.' name_header{nnn} '(1:512,:))'];
- eval(toeval)
- else
- toeval= ['subtable_c.' name_header{nnn} '=(subtable.' name_header{nnn} '(1:512,:))'];
- eval(toeval)
- end
- end
- fixedtable=struct2table(subtable_c);
- subtable=fixedtable;
- end
|