matlab floor和round
大家好,今天小六子来为大家解答以下的问题,关于matlab floor和round这个很多人还不知道,现在让我们一起来看看吧!
1、a(i)等于x对3取余数。
2、mod的例子如下:>> mod(3,3)ans =0>> mod(5,3)ans =2>> mod(1,3)ans =1mod的详细解释如下:>> help modmod Modulus after division.mod(x,y) is x - n.*y where n = floor(x./y) if y ~= 0. If y is not aninteger and the quotient x./y is within roundoff error of an integer,then n is that integer. The inputs x and y must be real arrays of thesame size, or real scalars.The statement "x and y are congruent mod m" means mod(x,m) == mod(y,m).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.Note: REM(x,y), for x~=y and y~=0, has the same sign as x.mod(x,y) and REM(x,y) are equal if x and y have the same sign, butdiffer by y if x and y have different signs.。
本文分享完毕,希望对你有所帮助。