Matlab常用的算術函數(Arithmetic functions)
sin(x), cos(x), tan(x)
exp(x), log(x), log10(x)
- round(x) 四捨五入(Rounds a number to the nearest integer)
- ceil(x) 無條件進位(Rounds a number up to the nearest integer)
- floor(x) 無條件捨去(Rounds a number down to the nearest integer)
- fix(x) 往0的方向取最接近的整數,ex: fix(-3.3) = 3.3 (Rounds a number to the nearest integer towards zero)
- rem(x,y) x/y的餘數(The remainder left after division)
- mod(x,y) 也是餘數,但是和rem()的差別在於處理負數有差(The signed remainder left after division)
- abs(x) 絕對值(The absolute value of x)
- sign(x) 判釋正負The sign of x