actually i am calling a function in my main program twice with different inputs each time.
so i want to know the time taken for two calls.
i tried this
tic
[output1]=function[input1]
toc
time1=toc;
tic
[output2]=function[input2]
toc
time2=toc;
but its not giving correct results ,
i am getting time2<time1
but for my input2 when it goes to that called function it usually takes more time than for input1.so i should get time2>time1
so if i want to know the execution time of a function for two different inputs , is this the right way i am doing
or is there any other way to do this.
if so please let me know about that