필터 지우기
필터 지우기

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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by