Simple ways
1. To measure the time taken by code, use 'tic and 'toc'. 'toc' gives the time elapsed from last 'tic' command.
1.5. To store the value of the time elapsed use:
timeSoFar = toc; %return the time elapsed from the last 'tic'
1.5. To store the value of the time elapsed use:
timeSoFar = toc; %return the time elapsed from the last 'tic'
2. 'profile on' at the beginning of the program and at the end 'profile viewer' --- This gives detailed information about the time take by each functions.
For more info :
>>help tic
>>help profile
No comments:
Post a Comment