solve return result as the form of syms
1 回表示 (過去 30 日間)
古いコメントを表示
Hi fellows,
I have written this code
syms x
y=solve(1+(2/3)*x^4+(3/4)*x^(-3),x)
and then I got the result. But the problem is that I need the result to be called afterwards. But it seems that solve return the value as the form as syms instead of a number. So there is an error for that. Is anyone could told how to transfer the result of solve to just number instead of being as syms?
Thanks
0 件のコメント
採用された回答
Shashank Prasanna
2013 年 1 月 17 日
Just to a double of the output:
double(y)
and voila
2 件のコメント
Shashank Prasanna
2013 年 1 月 17 日
This works fine on my 2012b, what is your matlab version? I can test it out on that. Also, note that y would still be syms the output of double(y) will not be.
z = double(y)
>> whos z y Name Size Bytes Class Attributes
y 7x1 112 sym
z 7x1 112 double complex
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Stochastic Differential Equation (SDE) Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!