How to convert rational numbers to irrational numbers in disp in Matlab

925 Views Asked by At

How can I convert rational numbers to irrational numbers in $\operatorname{disp}$ in Matlab?

I wrote a method in Matlab to estimate the value using the Newton-Raphson Method but when I use $\operatorname{disp}$ to view the result it appears as [1/3 , 7/9 , 5/2].

I need it to display irrational numbers. How can I do this?

1

There are 1 best solutions below

0
On BEST ANSWER

You mean to display them as a decimal? Perhaps use double(). You can also try changing the format if you want to change the output for the entire project