MATLAB: Disable solve function warnings

disable warningsolvesolve functionwarning

I'm using the solve function in my program and every time I run it I get I get this whole text of warnings:
Warning: Support of character vectors that are not valid variable names or define a number will be removed in a
future release. To create symbolic expressions, first create symbolic variables and then use operations on them.
...
This is my program:
e1 = 'v1 = (10+v2+v3+0)/4';
e2 = 'v2 = (v1 + 10 + 0 + v4)/4';
e3 = 'v3 = (0+v1+v4+0)/4';
e4 = 'v4 = (v2+v3+0+0)/4';
s = solve(e1,e2,e3,e4);
Is there a way to simply ignore this warning in matlab?

Best Answer

"Is there a way to simply ignore this warning in matlab?"
warning('off', 'symbolic:sym:sym:DeprecateExpressions')
but better is just to rewrite to follow the suggestions
syms v1 v2 v3 v4
e1 = v1 == (10+v2+v3+0)/4;
e2 = v2 == (v1 + 10 + 0 + v4)/4;
e3 = v3 == (0+v1+v4+0)/4;
e4 = v4 == (v2+v3+0+0)/4;
s = solve(e1,e2,e3,e4);
My understanding is that they are pretty serious about turning off the feature you are using.
Related Question