how to get real quotient in division process?

i want to divide 230 by 255 and want to get the answer in decimal or real number. when i write 230/255 it gives me rounded answer but i need its actual answer in real number form.

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 5 月 25 日
編集済み: Mischa Kim 2014 年 5 月 25 日

0 投票

Saima, not quite sure what you mean, but if you need more significant digits for your answers enter
format long
in the command window, or use
vpa(233/255) % typically used for symbolic calculations

3 件のコメント

saima zia
saima zia 2014 年 5 月 25 日
thanks a lot Mischa. now plz also tell how to round it to 3 places after decimal point?
saima zia
saima zia 2014 年 5 月 25 日
it worked but the answer is sym type, thats y i can't apply any operation to the answer.
Mischa Kim
Mischa Kim 2014 年 5 月 25 日
Use something like
num = 233/255;
vpa(num, 3)
fprintf('%6.3f\n', num)
Note that vpa is typically used for symbolic calculations.

サインインしてコメントする。

カテゴリ

質問済み:

2014 年 5 月 25 日

編集済み:

2014 年 5 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by