From: fiza khalid on
hey can anyone help me
i am using built in time functions in matlab as tic toc and cputime for calculating time for my function whenever i run that it give different time for the same function i want that it give same time for the fuction everytime until i changed my input.
do reply me
thnx in advance.
From: dpb on
fiza khalid wrote:
> hey can anyone help me
> i am using built in time functions in matlab as tic toc and cputime for
> calculating time for my function whenever i run that it give different
> time for the same function i want that it give same time for the fuction
> everytime until i changed my input.
....

Well, the returned time won't necessarily be absolutely identical every
time for many reasons, the most obvious of which is that owing to
various factors it isn't...

This is a case of adjusting one's expectations to match reality would
seem to be in order.

--
From: Cris Luengo on
dpb <none(a)non.net> wrote in message <i1id1k$115$1(a)news.eternal-september.org>...
> fiza khalid wrote:
> > hey can anyone help me
> > i am using built in time functions in matlab as tic toc and cputime for
> > calculating time for my function whenever i run that it give different
> > time for the same function i want that it give same time for the fuction
> > everytime until i changed my input.
> ...
>
> Well, the returned time won't necessarily be absolutely identical every
> time for many reasons, the most obvious of which is that owing to
> various factors it isn't...
>
> This is a case of adjusting one's expectations to match reality would
> seem to be in order.
>

http://blogs.mathworks.com/pick/2008/03/28/timeit-benchmarking-function/
 | 
Pages: 1
Prev: uiputfile default path
Next: Resampling