solve return result as the form of syms

1 回表示 (過去 30 日間)
xueqi
xueqi 2013 年 1 月 17 日
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

採用された回答

Shashank Prasanna
Shashank Prasanna 2013 年 1 月 17 日
Just to a double of the output:
double(y)
and voila
  2 件のコメント
xueqi
xueqi 2013 年 1 月 17 日
No it doesn't work. In the workplace I can see y still is in the form of syms...
Shashank Prasanna
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 ExchangeStochastic Differential Equation (SDE) Models についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by