method one;
profile on
<body?>
profile viewer
Will all the time codes are displayed, with each row each time statistical function, at a glance;
Method Two:
tic;
<body-part1>
t1 = toc;% <body-part1> Processed
<body-part2>
t2 = toc;% total time;
t3 = t2 - t1;% <body-part1> Processed