Q:

Use help to determine the difference between the rem and mod functions

0

Use help to determine the difference between the rem and mod functions.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> help rem rem Remainder after division. rem(x,y) is x - n.*y where n = fix(x./y) if y ~= 0. By convention: rem(x,0) is NaN. rem(x,x), for x~=0, is 0. rem(x,y), for x~=y and y~=0, has the same sign as x. rem(x,y) and MOD(x,y) are equal if x and y have the same sign, but differ by y if x and y have different signs. >> help mod mod Modulus after division. mod(x,y) is x - n.*y where n = floor(x./y) if y ~= 0. By convention: mod(x,0) is x. mod(x,x) is 0. mod(x,y), for x~=y and y~=0, has the same sign as y.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now