MATLAB: String to sym error

stringsym

I have the string
>> d='1/m'
>> class(d)
char
>> p=sym(d)
I get:
Warning: Support of strings that are not valid variable names or define a number will be removed in a future relase. To create symbolic expressions, firs create symbolic variables and then use operations on them.
after that p is empty
I tried syms m; at the beginning but i get the same error

Best Answer

Alberto, the functionality you are using will be removed in future releases, but you can still use it. That is why you are getting a warning message (not an error message).
Instead use,
syms m
p = 1/m