solve return result as the form of syms

1 view (last 30 days)
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

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 17 Jan 2013
Just to a double of the output:
double(y)
and voila
  2 Comments
xueqi
xueqi on 17 Jan 2013
No it doesn't work. In the workplace I can see y still is in the form of syms...
Shashank Prasanna
Shashank Prasanna on 17 Jan 2013
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

Sign in to comment.

More Answers (0)

Categories

Find more on Stochastic Differential Equation (SDE) Models in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!