Showing posts with label Matlab. Show all posts
Showing posts with label Matlab. Show all posts

Thursday, March 20, 2014

Matlab模擬計算時間寫法

請在模擬程式加入這段程式碼
% Record the start time instance here
tStart = now;



(write your Matlab simulation code here)


% Record the end time instance here
tEnd = now;
% Calculate and show the total simulation time
tSim = tEnd-tStart;
disp (['Total simulation time is [' datestr(tSim,13) ']']);

ps. 灰色為註解,依照使用者需求自行決定是否加入

Monday, March 10, 2014

Matlab隱函數繪圖

繪圖指令
ezplot(fun, [range])
舉例
ezplot('sqrt(x^2+y^2)/1000-0.5', [-510,510,-510,510]);