I want to index an expression in Matlab to return only the first argument
new_mets{i}=strsplit(mets{j},' (');
ans =
'Anteisopentadecanoylcardiolipin' 'B. subtilis)'
like this:
new_mets{i}=strsplit(mets{j},' (')(1);
ans =
'Anteisopentadecanoylcardiolipin'
but I get:
Error: ()-indexing must appear last in an index expression
of course I can save it as a variable first and index in subsequently, but that is inefficient and there must surely be an easier way