How to get the remainder of a division in Simulink?
Mostrar comentarios más antiguos
Hi!
How can I get the remainder of a division in simulink (similar to the rem function of matlab)? thanks, paulo
1 comentario
Suyash Jadhav
el 2 de Jul. de 2024
You can use the formula-
Rem= number to divide- floor(Quotient*Divisor)
This can be constructed in simulink.
Respuesta aceptada
Más respuestas (3)
Paulo Silva
el 11 de Mayo de 2011
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!
Paulo Melo
el 12 de Mayo de 2011
0 votos
Arjunkrishna Mitta
el 20 de Ag. de 2021
0 votos
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
Categorías
Más información sobre General Applications en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!