You can use the floor function:

result = floor(13/3)

This function always rounds down to the lower integer

Answer from drops on Stack Overflow
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › arithmetic operations
mod - Remainder after division (modulo operation) - MATLAB
b = mod(a,m) returns the remainder after division of a by m, where a is the dividend and m is the divisor. This function is often called the modulo operation, which can be expressed as b = a - m.*floor(a./m).
🌐
MathWorks
mathworks.com › fixed-point designer › data type exploration › fixed-point specification › fixed-point specification in matlab › fixed-point math functions
mod - Modulus after division for fi objects - MATLAB
m = mod(x,y) returns the modulus after division of x by y, where x is the dividend and y is the divisor. This function is often called the modulo operation, which can be expressed as m = x - floor(x./y).*y.
Discussions

matlab - How I can get the other part after a division with a modulo operator - Stack Overflow
When I divide 13 with 3 and use integer numbers the result will be 4. With mod(13,3) I receive the remainder 1. But how can I get the 4 in Matlab? I think it is not possible to switch to integer nu... More on stackoverflow.com
🌐 stackoverflow.com
What is modulo in simulink?
From what I understand, the modulo N used in the figure is just a depiction of the operation required. You can use a constant block having the value of N instead of the Modulo-N block, and then use a MATLAB Function block to perform the Modulo N operations as desired. More on mathworks.com
🌐 mathworks.com
1
0
January 25, 2023
Modulo Operator in Embedded Coder
Hello ! I am using the mod block in Simulink (for modulo operation) from the math tools. I want then to generate code with embedded coder, which is working but why is the code generation creati... More on mathworks.com
🌐 mathworks.com
1
0
February 22, 2021
mod function
b = mod(a,m) returns the remainder after division of a by m, where a is the dividend and m is the divisor. From here https://www.mathworks.com/help/matlab/ref/mod.html More on reddit.com
🌐 r/matlab
3
2
February 25, 2023
🌐
MathWorks
mathworks.com › matlabcentral › answers › 266180-mod-or-modulus-operator-in-matlab
Mod or Modulus operator in MATLAB - MATLAB Answers - MATLAB Central
February 2, 2016 - I want to perform a mod operation on a number. ||10|| = 10 |||-10| = 10 Basically it returns the positive value of the input. All I could find is the sign() operator which returns 1,-1 or...
🌐
MathWorks
mathworks.com › symbolic math toolbox › mathematics › number theory
mod - Symbolic modulus after division - MATLAB
Calling mod for numbers that are not symbolic objects invokes the MATLAB® mod function.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 1900495-what-is-modulo-in-simulink
What is modulo in simulink? - MATLAB Answers - MATLAB Central
January 25, 2023 - From what I understand, the modulo N used in the figure is just a depiction of the operation required. You can use a constant block having the value of N instead of the Modulo-N block, and then use a MATLAB Function block to perform the Modulo N operations as desired.
Find elsewhere
🌐
Wikipedia
en.wikipedia.org › wiki › Modulo
Modulo - Wikipedia
2 weeks ago - Some calculators have a mod() function button, and many programming languages have a similar function, expressed as mod(a, n), for example. Some also support expressions that use "%", "mod", or "Mod" as a modulo or remainder operator, such as a % n or a mod n.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 851890-modulo-operator-in-embedded-coder
Modulo Operator in Embedded Coder - MATLAB Answers - MATLAB Central
February 22, 2021 - The reason is that when Embedded Coder generates a code for modulo block it also tries to cover some invalid cases such as (0%0 )etc. While as if we use a direct % operator compiler will give an error. Hence after verifying that the inputs are valid then fmod function is used which is the function for performing modulus operation in C. ... Sign in to comment. Sign in to answer this question. ... Find the treasures in MATLAB Central and discover how the community can help you!
🌐
MathWorks
mathworks.com › matlabcentral › answers › 485051-apply-conditions-in-if-statement
Apply conditions in if statement. - MATLAB Answers - MATLAB Central
July 4, 2019 - You appear to be wanting to use ... mathematical Modulo operator always has two parameters: the value whose remainder is to be found, and the base with respect to which the remainder is to be found....
🌐
MathWorks
mathworks.com › matlab › language fundamentals › operators and elementary operations
Arithmetic Operations - MATLAB & Simulink
Arithmetic functions include operators for simple operations like addition and multiplication, as well as functions for common calculations like summation, moving sums, modulo operations, and rounding. For more information, see Array vs. Matrix Operations. ... Array vs. Matrix Operations · Matrix operations follow the rules of linear algebra, and array operations execute element by element operations and support multidimensional arrays. The period character (.) distinguishes the array operations from the matrix operations. ... Most binary operators and functions in MATLAB® support numeric arrays that have compatible sizes.
🌐
The Data School
thedataschool.co.uk › henry-mak › modulo-operator-intro
A short introduction to the Modulo Operator
Discover the power of data analytics with The Data School. As the training arm of The Information Lab, we equip organizations worldwide with the tools and knowledge to harness the true value of their data
🌐
MathWorks
mathworks.com › matlabcentral › answers › 331430-is-it-possible-to-detect-the-repeated-values-using-modulo-operator-mod-16-of-a-matrix-and-replace
is it possible to detect the repeated values using modulo operator (mod 16) of a matrix and replace the repeated mod value wi... - MATLAB Answers - MATLAB Central
December 14, 2016 - Suppose we have a matrix A=[7871,5995,3451,5583;7151,5093,3251,5485;3227,5835,7647,5295;3475,5253,7375,5773] and its modulo: Mod(A,16)= [15,11,11,15;,15,5,3,13;11,11,15,15;3,5,15,13] The number ...
🌐
Quora
quora.com › I-am-a-beginner-in-MATLAB-programming-What-is-the-difference-between-the-two-operations-rem-and-mod-How-are-both-functionally-different
I am a beginner in MATLAB programming. What is the difference between the two operations 'rem' and 'mod'? How are both functionally different? - Quora
Answer (1 of 2): Like Vinay Madhusudanan rightly pointed out, rem() and mod() will bear the same result if both ‘x’ and ‘y’ are of the same sign. The difference between mod() and rem() is explained with the help of an example given below. EXAMPLE: Consider mod(x,y). Upon dividing ‘x’ by ‘y’ yie...
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › arithmetic operations
rem - Remainder after division - MATLAB
This MATLAB function returns the remainder after division of a by b, where a is the dividend and b is the divisor.