Hi, there.. I'm solving simple ecuation in matlab but when i run the programe the answer is displaying in fractional numbers. How can I change it to display decimal number?
No products are associated with this question.
It looks to me like you have calculated values using the symbolic toolbox. To display those values in floating point, use double() on them. For example,
(If we had known you were using the symbolic toolbox we could have answered much earlier.)
If you want to display decimal ( floating point) numbers try :
>>format long % or format short
If you want fractional display try :
and try :
n = 5371 x = ceil(sqrt(n)) i = 1 y = √(x0² - n) if (y is an integer and least significant digit of x are 0, 1, 4 or 9) p = x + y q = x- y end process else x0 = x1 + i //[till y is an integer]
how i convert "bold" line in matlab?
Play games and win prizes!Learn more