there is a error for solving equations
1 回表示 (過去 30 日間)
古いコメントを表示
>> d = 'x^2 + 9*x –7 = 0'; >> solve(d) Error using solve>processString (line 354) ' x^2 + 9*x –7 = 0 ' is not a valid expression or equation.
Error in solve>getEqns (line 284) eqns = processString(eqns, v, vc);
Error in solve (line 160) [eqns,vars,options] = getEqns(varargin{:});
0 件のコメント
回答 (2 件)
A Jenkins
2014 年 6 月 6 日
When I copy/paste your code, I get that the '–' is the wrong character: it is the 'dash' (U+2013) character instead of the 'minus' (U+002D) character.
Does this work?
d = 'x^2 + 9*x - 7 = 0';
solve(d)
0 件のコメント
math search
2014 年 6 月 6 日
1 件のコメント
A Jenkins
2014 年 6 月 6 日
The following worked for me, though it might be system dependent.
>> dec2hex('-')
ans =
2D
>> dec2hex('–')
ans =
2013
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!