how to save the equation with only 2 digits after the decimal point ?

3 ビュー (過去 30 日間)
jeffin
jeffin 2018 年 11 月 17 日
編集済み: Walter Roberson 2018 年 11 月 17 日
I have a equation which goes like this.
= (2.727924*((2.762532 + 4.792389 * (sqrt((0.086465*((0.000000 - ((1.000000*((LinZcom - -45)/44.784)+0.000000)/0.999226))^2 + (0.000000 - ((1.000000*((RotYext - 102)/5166)+0.000000)/0.998586))^2 + (0.000000 - ((1.000000*((CAirBag - 0.2)/0.3)+0.000000)/0.999097))^2 + (0.000000 - ((1.000000*((KBDistn - 0)/100)+0.000000)/0.996506))^2 + (0.000000 - ((1.000...
i need matlab help to save this equation by rounding off with 2 digits after the deimal. kindly help.

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 11 月 17 日
編集済み: Walter Roberson 2018 年 11 月 17 日
vpa(YourVariable, 2)
This will do for most purposes, but is really rounding to 2 significant places instead of to 2 decimal places. Rounding to 2 decimal places in a symbolic expression is more difficult.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by