Disable solve function warnings
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2018 年 3 月 9 日
編集済み: Walter Roberson
2018 年 3 月 9 日
"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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!