File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 6363 for iField = 1 : numel(listFields )
6464 output.(listFields{iField })(~filterIdx ) = [];
6565 end
66-
66+
6767 output = convertStruct(output );
6868
6969 % Convert the structure to dataset
8686 % changes the structure
8787 %
8888 % from struct.field(i,1) to struct(i,1).field(1)
89-
89+
9090 fieldsList = fieldnames(structure );
9191 tmp = struct();
92-
92+
9393 for iField = 1 : numel(fieldsList )
9494 for i = 1 : numel(structure.(fieldsList{iField }))
95- tmp(i ,1 ).(fieldsList{iField }) = structure.(fieldsList{iField })(i ,1 );
95+ tmp(i , 1 ).(fieldsList{iField }) = structure.(fieldsList{iField })(i , 1 );
9696 end
9797 end
98-
98+
9999 structure = tmp ;
100-
100+
101101end
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ function test_readAndFilterLogfileBasic()
2929 logFile(end , 1 ).Speed = 2 ;
3030 logFile(end , 1 ).is_Fixation = true ;
3131 logFile(end , 1 ).LHL24 = 2 : 13 ;
32-
32+
3333 logFile(3 , 1 ).onset = 2 ;
3434 logFile(end , 1 ).trial_type = ' motion_up' ;
3535 logFile(end , 1 ).duration = 3 ;
3636 logFile(end , 1 ).Speed = 2 ;
3737 logFile(end , 1 ).is_Fixation = true ;
3838 logFile(end , 1 ).LHL24 = 1 : 12 ;
39-
39+
4040 logFile(4 , 1 ).onset = 2 ;
4141 logFile(end , 1 ).trial_type = ' motion_down' ;
4242 logFile(end , 1 ).duration = 3 ;
@@ -62,7 +62,7 @@ function test_readAndFilterLogfileBasic()
6262 assertEqual(exist(expectedFile , ' file' ), 2 );
6363
6464 content = bids .util .tsvread(expectedFile );
65-
65+
6666 assertEqual(size(content .trial_type ), [2 , 1 ]);
6767
6868 assertEqual(content.trial_type{1 }, ' motion_down' );
You can’t perform that action at this time.
0 commit comments