How to keep precision of Math Operations?

5 ビュー (過去 30 日間)
Henok Mentamo
Henok Mentamo 2014 年 10 月 1 日
回答済み: Iain 2014 年 10 月 1 日
Hi,
I am working with pressure and temprature sensor values in a Simulink project where I need to have higher precision than the one I am getting now which is just only two decimal points. How can I increase precision of the output from basic Math operations such as +-%* blocks. I keep getting two decimal points even if I change the output data type of the blocks to double.
Thanks in advance for the help.

回答 (3 件)

ES
ES 2014 年 10 月 1 日
format can set the precison of display and logging in MATLAB!

Henok Mentamo
Henok Mentamo 2014 年 10 月 1 日
I am using the Simulink env't as I am working in an event driven control system. It would be so nice to know any solution to solve this problem.
  1 件のコメント
Stephen23
Stephen23 2014 年 10 月 1 日
Is this an answer to your own question? Please use the comments under the question text.

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


Iain
Iain 2014 年 10 月 1 日
You are probably getting more than 2 decimal places of "accuracy". You're probably getting 15 or 16 significant figures worth of accuracy, but only displaying 2 decimal places...

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by