Decimal Precision

조회 수: 9 (최근 30일)
David Reilly
David Reilly 2011년 3월 6일
Hello,
I'm trying to design and test a three-level inverter. The switching interval used by Space Vector Modulation (SVM) is very narrow, that is, the time slot are of extremely quick duration. Is there a way to increase the decimal precision of matlab/simulink? My model is using a continuous solver with a fixed step time of 1e-6. The output of my basic S-function is rounding up to 4 decimal places. For example t = 0.2505 rather than t = 0.25045. Obviously there will be a limit to the precision achieved by the application. Is 4 decimal places the limit? Any help would be greatly appreciated.

답변 (1개)

John D'Errico
John D'Errico 2011년 3월 6일
You are merely seeing the DISPLAY precision, not the actual double precision value stored in matlab. Instead, try this:
format long g
  댓글 수: 2
David Reilly
David Reilly 2011년 3월 6일
John,
Thanks for your quick reply. I should of looked in the workspace!!!
All the best
Matt Tearle
Matt Tearle 2011년 3월 6일
can you please accept john's answer so everyone can see that this "case is closed".

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Nonlinear Operators에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by