Prev: Wavelet Scalar Quantization Code
Next: ylim in errorbar
From: Richard on 10 Aug 2010 16:24 Hi, I've a simulation that takes nearly an hour to run for 1 iteration. I've been using tic and toc to determine what sections take longest to run but there are certain sections like function calls that run an unknown number of times. Is there a way to use tic and toc around a section of code and get a 'total' execution time duirng a complete simulation run? i.e. the sum of all times it runs or is called Thanks! Richard
From: Sean on 10 Aug 2010 16:28 "Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3sch4$i3n$1(a)fred.mathworks.com>... > Hi, I've a simulation that takes nearly an hour to run for 1 iteration. I've been using tic and toc to determine what sections take longest to run but there are certain sections like function calls that run an unknown number of times. Is there a way to use tic and toc around a section of code and get a 'total' execution time duirng a complete simulation run? i.e. the sum of all times it runs or is called > Thanks! > > Richard doc profile
From: Matt Fig on 10 Aug 2010 16:30 Why not just use the profiler?
From: Ross W on 10 Aug 2010 16:31 "Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3sch4$i3n$1(a)fred.mathworks.com>... > Hi, I've a simulation that takes nearly an hour to run for 1 iteration. I've been using tic and toc to determine what sections take longest to run but there are certain sections like function calls that run an unknown number of times. Is there a way to use tic and toc around a section of code and get a 'total' execution time duirng a complete simulation run? i.e. the sum of all times it runs or is called > Thanks! > > Richard There's a tool called profile help profile This is designed to do the sort of thing you describe Ross
From: Richard on 10 Aug 2010 17:34 "Ross W" <rosswoodskiwi(a)hotmail.com> wrote in message <i3scua$elk$1(a)fred.mathworks.com>... > "Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3sch4$i3n$1(a)fred.mathworks.com>... > > Hi, I've a simulation that takes nearly an hour to run for 1 iteration. I've been using tic and toc to determine what sections take longest to run but there are certain sections like function calls that run an unknown number of times. Is there a way to use tic and toc around a section of code and get a 'total' execution time duirng a complete simulation run? i.e. the sum of all times it runs or is called > > Thanks! > > > > Richard > > There's a tool called profile > > help profile > > This is designed to do the sort of thing you describe > > Ross delighted I asked. Thanks v. much
|
Pages: 1 Prev: Wavelet Scalar Quantization Code Next: ylim in errorbar |