How to get the remainder of a division in Simulink?
이전 댓글 표시
Hi!
How can I get the remainder of a division in simulink (similar to the rem function of matlab)? thanks, paulo
댓글 수: 1
Suyash Jadhav
2024년 7월 2일
You can use the formula-
Rem= number to divide- floor(Quotient*Divisor)
This can be constructed in simulink.
채택된 답변
추가 답변 (3개)
Paulo Silva
2011년 5월 11일
in1---->|MUX|---->|Matlab Fcn |--->out
in2---->| | |u(1) - fix(u(1)./u(2)).*u(2)|
or
in1---->|MUX|---->|Matlab Fcn |--->out
in2---->| | |rem(u(1),u(2))|
or even better (found this one now)
Use the Math Function from the Math Operations and choose the rem function!
Arjunkrishna Mitta
2021년 8월 20일
0 개 추천
We can also use the math operator and in drop down select the mod operator and you can get the remainder in simulink.
Just click on blank space and type mod you will get the block required
카테고리
도움말 센터 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!