How to use integer rounding modes in C based statechart ?

조회 수: 2 (최근 30일)
Swapnil Kulkarni
Swapnil Kulkarni 2018년 1월 30일
댓글: Swapnil Kulkarni 2018년 1월 31일
I want to use integer rounding mode "round" in arithmatic operation, inside c- based statechart. Unfortunately "round" function is not supported in C-based statechart so is there any alternative ?
By default flooring operation takes place. e.g. when division operation results in 500.0998 it should be rounded up to 501 when conevrted into integer buts its giving it as 500.

답변 (1개)

Abhishek Ballaney
Abhishek Ballaney 2018년 1월 30일
https://in.mathworks.com/help/simulink/slref/coder.ceval.html
  댓글 수: 1
Swapnil Kulkarni
Swapnil Kulkarni 2018년 1월 31일
Thanks Abhishek for the link. But I think this link not very useful for me, Since I need to call the function from Statechart and not from generated code of m file.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by