Skip to content

Commit d537b2a

Browse files
committed
make inputs and func name more intuitive
1 parent aa7b535 commit d537b2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/readAndFilterLogfile.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function outputFiltered = readAndFilterLogfile(filterHeader, filterContent, varargin)
1+
function outputFiltered = readAndFilterLogfile(columnName, filterBy, varargin)
22
% outputFiltered = readOutputFilter(filterHeader, filterContent, varargin)
33
%
44
% It will display in the command window the content of the `output.tsv' filtered by one element
@@ -9,9 +9,9 @@
99
%
1010
% INPUT:
1111
%
12-
% - filterHeader: 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')
14-
% - filterContent: string, the content of the column you want to filter out. It can take just
14+
% - 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)
1717
% - varargin: either cfg (to display the last run output) or the file path as string
@@ -39,7 +39,7 @@
3939
output = bids.util.tsvread(tsvFile);
4040

4141
% Get the index of the target contentent to filter and display
42-
filterIdx = find(strncmp(output.(filterHeader), filterContent, length(filterContent)));
42+
filterIdx = find(strncmp(output.(columnName), filterBy, length(filterBy)));
4343

4444
% Convert the structure to dataset
4545
outputDataset = struct2dataset(output);

0 commit comments

Comments
 (0)