2010年9月28日 星期二

Matlab常用的算術函數

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

2010年9月26日 星期日

iRobot 打掃機器人

最近新買一台iRobot 打掃機器人,操作介面非常簡單,只要按下Clean鍵他就會開始打掃,本來擔心他沒辦法房間的角落,經過約50分鐘之後,他已經跑遍我們家的每個地方,掃完之後比我自己跪在地板上擦地還要乾淨。

打掃機器人充電
打掃完後會自己回去休息。

整個家裡都乾乾淨淨,心情也就好了。