using a C code function block or a state machine with the execution set to C language, the function "fmod" from the standard math.h library can used.
Not sure if there is a way to do it natively in MATLAB or simulink but this work around gets the job done