Problem 695. Parse string and identify specific string sequence in algebraic equation
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
Richard Zapor
on 1 Jun 2012
I think the correct example solution is {'Y1', 'Y12', 'Y3'}.
Solution Comments
Show commentsProblem Recent Solvers56
Suggested Problems
-
Find common elements in matrix rows
2633 Solvers
-
Count from 0 to N^M in base N.
235 Solvers
-
Moving average (variable kernel length)
126 Solvers
-
368 Solvers
-
Area of an equilateral triangle
6191 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!