I am trying to index and extract a series of variables from a table i've created based on the VariableNames. I would rather index using the VariableNames as opposed to numerical or logical index due to the fact that there might be different numbers of trials for the variables.
Using the below code I can call one variable at a time. The '_1' represents the trial number which could go up to '_20'.
C1vC2Trials = C1MPVNormVariables(:,'C1MPVNorm_1');
However when trying to use the * wildcard to call all trials for that variable I get an error.
Error: Unrecognized variable name 'C1MPVNorm_*'.
Is this possible to do with tables or is there a easy work around to find the number of VariableNames in the table which correspond to the ones I wish to extract?
Thanks in advance!