solve return result as the form of syms

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

 Respuesta aceptada

Shashank Prasanna
Shashank Prasanna el 17 de En. de 2013

0 votos

Just to a double of the output:
double(y)
and voila

2 comentarios

xueqi
xueqi el 17 de En. de 2013
No it doesn't work. In the workplace I can see y still is in the form of syms...
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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by