![]() ![]() In the above examples, we have used integers as the dividends. The mod function will calculate remainder when each of these scalars is divided by the divisor passed as the second argument.Īs we can see, we have obtained the remainder for each element passed as the input to the mod function. In this example, we will use the mod function for a set of scalar inputs with both positive and negative numbers. ![]() our dividend will be a negative number.Īs we can see, we have obtained 1 as the output of the mod function, which is the remainder when -15 is divided by 8. In this example, we will use the mod function for negative scalar inputs, i.e. In this example, we will use the mod function for a set of scalar inputs. This is how our input and output will look like in MATLAB:Īs we can see, we have obtained 3 as the output of the mod function which is the remainder when 15 is divided by 6.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |