MATLAB Answers


How to use integer rounding modes in C based statechart ?

Asked by Swapnil Kulkarni on 30 Jan 2018
Latest activity Commented on by Swapnil Kulkarni on 31 Jan 2018
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.


Sign in to comment.

1 Answer

Answer by Abhishek Ballaney on 30 Jan 2018

  1 Comment

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.

Sign in to comment.