这两个函数是什么意思,怎么用,请指教
------解决方案--------------------------------------------------------
简单的说mod(a,b)就是求的是a除以b的余数。比方说mod(100,3)=1,mod(17,6)=5.
rem(X,0) is NaNrem(X,X) for X~=0 is 0rem(X,Y) for X~=Y and Y~=0 has
the same sign as X.Remarksmod(X,Y) for X~=Y and Y~=0 has
the same sign as Y.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.The rem function returns a result
that is between 0 and sign(X)*abs(Y). If Y is
zero, rem returns NaN.
rem与mod函数的区别。rem(x,y)和mod(x,y)要求x,y必须为相同大小的实矩阵或为标量。
------解决方案--------------------------------------------------------
1楼完全正解,楼主有时间看看VB之类的程序语言,有很多相似的函数。