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. 灰色為註解,依照使用者需求自行決定是否加入

No comments:

Post a Comment