152152
153153 % print the basic BIDS columns
154154 fprintf(logFile .fileID , ' %s\t%s\t%s ' , ' onset' , ' duration' , ' trial_type' );
155+ fprintf(1 , ' %s\t%s\t%s ' , ' onset' , ' duration' , ' trial_type' );
155156
156157 printHeaderExtraColumns(logFile );
157158
@@ -174,6 +175,7 @@ function printHeaderExtraColumns(logFile)
174175 headerName = returnHeaderName(namesExtraColumns{iExtraColumn }, nbCol , iCol );
175176
176177 fprintf(logFile .fileID , ' \t%s ' , headerName );
178+ fprintf(1 , ' \t%s ' , headerName );
177179
178180 end
179181
@@ -281,6 +283,7 @@ function printHeaderExtraColumns(logFile)
281283 printExtraColumns(logFile , iEvent );
282284
283285 fprintf(logFile(1 ).fileID, ' \n ' );
286+ fprintf(1 , ' \n ' );
284287
285288 end
286289 end
@@ -307,12 +310,15 @@ function printData(output, data)
307310 % for numeric data we replace any nan by n/a
308311 if ischar(data )
309312 fprintf(output , ' %s\t ' , data );
313+ fprintf(1 , ' %s\t ' , data );
310314 else
311315 for i = 1 : numel(data )
312316 if isnan(data(i ))
313317 fprintf(output , ' %s\t ' , ' n/a' );
318+ fprintf(1 , ' %s\t ' , ' n/a' );
314319 else
315320 fprintf(output , ' %f\t ' , data(i ));
321+ fprintf(1 , ' %f\t ' , data(i ));
316322 end
317323 end
318324 end
0 commit comments