From: Asghar on
"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <hqaobh$c6m$1(a)fred.mathworks.com>...
> "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <hqanlg$1un$1(a)fred.mathworks.com>...
> > Let me amend that last bit of advice a bit. You should allow for some kind of fixed overhead on your calls to a bubblesort routine by getting the best a and b for t = a*n*log(n) + b, or else take only values of n from, say, n = 1000 to n = 10000, something like that. The low values of n will probably be somewhat misleading for predicting extrapolated values.
> >
> > Roger Stafford
>
> Come to think of it, as James has said, bubblesort is not very efficient and, in at least the worst case, tends to be order n-squared, so maybe you had better find the best fitting quadratic function in n instead of n*log(n).
>
> It's hard to be sure, and that in turn should show you how unreliable this general kind of far-reaching extrapolation is likely to be.
>
> Roger Stafford

ok thank but how do i get the best values of a and b? :s i'm not very good at this and it is getting quite confusing :S sorry about that guys
From: John D'Errico on
"Asghar " <asgharally(a)hotmail.com> wrote in message <hqapjc$2ec$1(a)fred.mathworks.com>...

> ok thank but how do i get the best values of a and b? :s i'm not very good at this and it is getting quite confusing :S sorry about that guys

You will never get to be good unless you make some
effort of your own. Simply giving up and saying that
you are not good at it is a way to ensure that you
will never learn. And we don't terribly want to just
enable you to not learn.

help polyfit

Read the help. Make an effort.

John
From: Asghar on
"John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <hqaq1t$99q$1(a)fred.mathworks.com>...
> "Asghar " <asgharally(a)hotmail.com> wrote in message <hqapjc$2ec$1(a)fred.mathworks.com>...
>
> > ok thank but how do i get the best values of a and b? :s i'm not very good at this and it is getting quite confusing :S sorry about that guys
>
> You will never get to be good unless you make some
> effort of your own. Simply giving up and saying that
> you are not good at it is a way to ensure that you
> will never learn. And we don't terribly want to just
> enable you to not learn.
>
> help polyfit
>
> Read the help. Make an effort.
>
> John

yes i have been reading :) trying my best to understand all this but right now it's too much..
i've read about the polyval and polyfit but i can't really understand what is the difference and what is the output i get?