Disable solve function warnings
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hassan Alhobail
am 9 Mär. 2018
Kommentiert: Hassan Alhobail
am 9 Mär. 2018
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?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Mär. 2018
Bearbeitet: Walter Roberson
am 9 Mär. 2018
"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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!