How I can obtain the numerical values of a symbolic results?

191 views (last 30 days)
For example, I have this expression -(5^(1/2)*i - (1 - 3*5^(1/4))^(1/2) + 5*i)/(8*pi), how I can obtain the numerical result?
Pilar Jiménez
Pilar Jiménez on 23 Jan 2017
Yes, I try to avoid a result like this 2745406554013086831442544068479080209^(1/2)*4355616553956842689236828859350347876557^(1/2)*108890357414700308308279874378165827665920^(1/2))/829748217121411424736445675629054455395170669059925077917696

Sign in to comment.

Answers (1)

Niels on 23 Jan 2017
of you have a symbolic expression use double (a is of class sym)
John D'Errico
John D'Errico on 23 Jan 2017
Double will produce a double precision result. If you want a symbolic result that has still many digits, use vpa.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!