str2syms(symstr)

str2syms evaluates a string representing a symbolic expression.

You are now following this Submission

str2syms evaluates symstr where symstr is a string representing a symbolic expression.
Additionally to str2sym, str2syms declares unknown variables as symbolic in the caller workspace.
Example:
syms x y
y = x;
z = str2syms('a + y')
creating symbolic variable a
z =
a + x

Cite As

Bardo (2026). str2syms(symstr) (https://uk.mathworks.com/matlabcentral/fileexchange/67519-str2syms-symstr), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0