Timing (tic toc) - matlab

script
matlab

#1

Lumerical doesn’t have a timing function, for those whom have matlab, you can use the following code:

matlab('tic'); #Code goes here matlab('t=toc;'); matlabget(t); ? 'Total elapsed time: ' + num2str(t) + 's';

If you have matlab already linked, it is pretty fast and the easiest (not the best) way to timing in matlab.


#2

Thanks, this is useful especially for some of long analysis scripts.