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".
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers60
Suggested Problems
-
1798 Solvers
-
Count from 0 to N^M in base N.
241 Solvers
-
Back to basics 25 - Valid variable names
340 Solvers
-
Matrix which contains the values of an other matrix A at the given locations.
240 Solvers
-
Saving MATLAB session to a file
201 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I think the correct example solution is {'Y1', 'Y12', 'Y3'}.