in matlab 2016a, mathworks deprecated use of sym
function parsing symbolic expressions:
>> expr = sym('x + 1') warning: support of strings not valid variable names or define number removed in future release. create symbolic expressions, first create symbolic variables , use operations on them. > in sym>convertexpression (line 1536) in sym>convertchar (line 1441) in sym>tomupad (line 1198) in sym (line 177) expr = x + 1
the warning's suggestion not practical when symbolic expressions being read file rather built hand in code. there function in matlab replace functionality? rather not regexprep
, eval
way through it.
this syntax deprecated in r2015b (archived documentation), though has been clear going happen many years. warning has been added in r2016a. knows when functionality removed.
you don't want use eval
, that's current symbolic engine uses when pass string expressions. after syntax removed, there still ways call mupad engine this:
f1 = evalin(symengine,'2*x+y^2+1')
one "workaround" of course disable warning
in r2016a:
s = warning('off','matlab:singularmatrix'); % change second string correct msgid ... % stuff warning(s); % reset warning state
Comments
Post a Comment