getStimSubsetTable.m 541 B

123456789
  1. function [StimSubsetTable, stimRowIndCell] = getStimSubsetTable(PathStimTable, stimSetCellStr, stimInd)
  2. %% This function gets a pathStimTable and a cell of stimuli name strings and a
  3. % index to the cell of stimuli to retrieve the matching table entries of the
  4. % given stimulus. This also works for extracting cycles of desired stimulus.
  5. stimRowIndCell = cellfun(@(x) strcmp(PathStimTable.stimParamFileName, x), ...
  6. stimSetCellStr, 'uni', 0);
  7. StimSubsetTable = PathStimTable(stimRowIndCell{stimInd}, :);
  8. end