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 › 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 › 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.
🌐
MathWorks
mathworks.com › symbolic math toolbox › mathematics › number theory
mod - Symbolic modulus after division - MATLAB
where floor rounds (a / b) toward negative infinity. For example, the modulus of –8 and –3 is –2, but the modulus of –8 and 3 is 1. If b = 0, then mod(a, b) = mod(a, 0) = 0. Calling mod for numbers that are not symbolic objects invokes the MATLAB® mod function.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 146684-how-can-i-perform-modulus-operation-mod
How can I perform modulus operation (mod)? - MATLAB Answers - MATLAB Central
March 6, 2023 - I am trying to use build-in functions in Matlab to help me to convert my project from decimal system to binary system. It is include addition, subtraction, multiplication and division as well. Also I am looking for a function that can produce the result of (mod) operations (remainder)such as:
🌐
EDUCBA
educba.com › home › data science › data science tutorials › matlab tutorial › matlab mod
Matlab Mod | Complete Guide to Matlab Mod with Syntax and Examples
February 25, 2023 - In the language of mathematics, the 2 numbers are called dividend (one which is divided) and divisor (one by which the dividend is divided). For example, when we use 7 and 2 as the inputs for the mod function, the output will be 1.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Delft Stack
delftstack.com › home › howto › matlab › modulo in matlab
Modulo in MATLAB | Delft Stack
February 14, 2024 - The basic syntax for the modulo ... operation with scalar values. ... In this example, we utilize the mod function to find the remainder when 51 is divided by 7....
Find elsewhere
🌐
Duke
pundit.pratt.duke.edu › wiki › MATLAB:Mod
MATLAB:Mod - PrattWiki
September 27, 2017 - MATLAB's mod command returns the remainder after division. It is also called the modulo operation (thus, mod).
🌐
MathWorks
mathworks.com › fixed-point designer › embedded implementation › fixed-point math operations in matlab and simulink
Modulo by Constant - Perform modulo operation with a constant denominator - Simulink
Divisor to use for the modulus operation, specified as a positive, real-valued, finite scalar, vector, matrix, or multidimensional array. ... Slope-bias representation is not supported for fixed-point data types. ... The Modulo by Constant block now supports vector and matrix inputs. The Modulo by Consant block is supported for use inside a For Each Subsystem block. ... Run the command by entering it in the MATLAB ...
🌐
MathWorks
mathworks.com › matlabcentral › answers › 337085-how-to-do-symbolic-mod-operation
How to do symbolic mod operation - MATLAB Answers - MATLAB Central
April 24, 2017 - I try to do mod function with symbolic variables. Is there a way to do something like mod(a+b,b)=a which means that the reminder of (a+b) divided by b is a. But MATLAB doesn't allow both the parameters of the mod function be symbolic.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 496017-using-the-mod-function-to-turn-a-vector-i-e-1-15-into-1-2-3-1-2-3-1-2-3-etc
Using the Mod Function to Turn a Vector (i.e. 1:15) into [1, 2, 3, 1, 2, 3, 1, 2, 3] etc. - MATLAB Answers - MATLAB Central
October 26, 2024 - I'm currently reading through the book MATLAB for Clinical and Cognitive Scientists by Mike Cohen. In the book, he mentions a 'neat trick' to covert some vector of linearly-spaced numbers (my e.g. 1:15) into a vector of numbers counting up from 1 to N over and over, using the mod function.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 485051-apply-conditions-in-if-statement
Apply conditions in if statement. - MATLAB Answers - MATLAB Central
April 24, 2017 - A = []; for ii = 1:length(subSequence) if any(ismember(subSequence{ii},out)) && mod(k-midpoint)
🌐
MathWorks
mathworks.com › matlabcentral › answers › 851890-modulo-operator-in-embedded-coder
Modulo Operator in Embedded Coder - MATLAB Answers - MATLAB Central
May 5, 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 more on Simulink in Help Center and File Exchange ... Find the treasures in MATLAB Central and discover how the community can help you!
🌐
MathWorks
mathworks.com › fixed-point designer › embedded implementation › fixed-point math operations in matlab and simulink
Modulo by Constant HDL Optimized - Perform mod operation with a constant denominator and generate optimized HDL code - Simulink
December 11, 2019 - The Modulo by Constant HDL Optimized block is supported for use inside a For Each Subsystem block. ... Run the command by entering it in the MATLAB Command Window.
🌐
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.
🌐
MathWorks
mathworks.com › fixed-point designer › embedded implementation › fixed-point math operations in matlab and simulink
modByConstant - Modulus after division by a constant denominator - MATLAB
February 2, 2016 - Y = modByConstant(X,d) performs the modulo operation (remainder after division) of X with respect to the denominator d.
🌐
Alphonsio
alphons.io › question › 636 › how-to-compute-modulo-operation-with-matlab
How to compute modulo operation with MATLAB?
The MATLAB modulo function mod(n,d) returns the remainder after the division of n by d: >>> mod(24,5) 4 In MATLAB, you can compute the modulo operati...