99 %
1010 % INPUT:
1111 %
12- % - columnName: string, the header of the column where the content of insterest is stored
12+ % - columnName: string, the header of the column where the content of insterest is stored
1313 % (e.g., for 'trigger' will be 'trial type')
1414 % - filterBy: string, the content of the column you want to filter out. It can take just
1515 % part of the content name (e.g., you want to display the triggers and you have
1616 % 'trigger_motion' and 'trigger_static', 'trigger' as input will do)
17- % - varargin: either cfg (to display the last run output) or the file path as string
17+ % - varargin: either cfg (to display the last run output) or the file path as string
1818 %
1919 % OUTPUT:
2020 %
2121 % - outputFiltered: dataset with only the specified content, to see it in the command window
2222 % use display(outputFiltered)
23-
23+
2424 % Checke if input is cfg or the file path
2525 if ischar(varargin{1 })
26- tsvFile = varargin{1 };
26+ tsvFile = varargin{1 };
2727 elseif isstruct(varargin{1 })
28- tsvFile = fullfile(varargin{1 }.dir.outputSubject, ...
29- varargin{1 }.fileName.modality, ...
30- varargin{1 }.fileName.events);
28+ tsvFile = fullfile(varargin{1 }.dir.outputSubject, ...
29+ varargin{1 }.fileName.modality, ...
30+ varargin{1 }.fileName.events);
3131 end
3232
3333 % Check if the file exists
3434 if ~exist(tsvFile , ' file' )
35- error([newline ' Input file does not exist' ])
35+ error([newline ' Input file does not exist' ]);
3636 end
3737
3838 % Read the the tsv file and store each column in a field of `output` structure
4747 % Get the dataset with the content of intereset
4848 outputFiltered = outputDataset(filterIdx , : );
4949
50- end
50+ end
0 commit comments