Given a string S that defines an algebraic expression such as:
S= 'X= A1 + A2*(Y1 + A3*Y3)*exp( A4*Y12 + Y1) ;'
return a cell array {'Y1', 'Y12', 'Y123'}
i.e. parse the string S and identify the unique variables in the expression that start with the letter "Y".
I think the correct example solution is {'Y1', 'Y12', 'Y3'}.
Good exercise. Two comments: 1) test case 3 has unbalanced parentheses. 2) Instruction should say that your are expecting results to be returned in sorted order, rather than the order in which they appear in the expression.
Omit columns averages from a matrix
482 Solvers
Who knows the last digit of pi?
488 Solvers
Make an awesome ramp for a tiny motorcycle stuntman
262 Solvers
302 Solvers
285 Solvers