error in my code
1 回表示 (過去 30 日間)
古いコメントを表示
syms x;
f=x^2+x;
M=solve(f);
n=size(M,2);
for i=1:n
if M(i)>1
disp('Ok');
else
disp('Again');
end
end
it show :
>> d
Nhap ham fx^2+x
Error using sym>notimplemented (line 2682)
Function 'gt' is not implemented for MuPAD symbolic
objects.
Error in sym/gt (line 801)
notimplemented('gt');
Error in d (line 5)
if M(i)>1
0 件のコメント
採用された回答
その他の回答 (1 件)
Sean de Wolski
2011 年 12 月 29 日
That's why input is seldomly recommended, especially when you plan on using the result in something important, like solve.
Recommended steps:
- Write a function that excepts one input argument
- Give this function some error checking to make sure that the one input argument meets the criteria for solve
- Do the rest of the stuff and output a reult.
doc function %will be your friend.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!