[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Curve fitting - polynomial fit help SOLVED
From: |
Rob Teasdale |
Subject: |
Re: Curve fitting - polynomial fit help SOLVED |
Date: |
Tue, 29 May 2007 16:37:50 -0700 (PDT) |
Hi Muthu,
Thanks for your reply. Your suggestion about coefficients led me to discover my
problem. I was reading my experimental data from a csv file, and the first
line of the text was labels etc. This was read by dlmread as a zero and
consequently my data was considerably affected. All I have to do know is work
out how to tell dlmread to start reading from the second row (the help says
that I should be able to call it with a row start, but I get a error: range
must include [R1 C1 R2 C2]) and I will be set.
Thanks again,
Rob
---- Original Message ----
From: Muthiah Annamalai <address@hidden>
To: Xierxes <address@hidden>
Sent: Saturday, 26 May, 2007 5:06:18 AM
Subject: Re: Curve fitting - polynomial fit help
On 5/25/07, Xierxes <address@hidden> wrote:
>
> Hi all,
>
> I am new to Octave and I am trying to fit some experimental data using a
> simple quadratic. I have already fit the data in gnuplot, but I need to
> develop more complex fitting curves - hence my move to Octave. The problem
> that I am having is that the coefficients generated by gnuplot do not match
> the ones generated by the polyfit, wpolyfit or leasqr (I modified the
> leasqrdemo to use a quadratic fit, and suit my data) functions. However when
> plotted the gnuplot fit looks much closer to experimental data. I am new to
> curve fitting and as a result I am not sure where to go next.
>
> I thought that gnuplot and leasqr used the same method for calculating the
> coefficients, hence I am somewhat lost. Anyway back to my probability and
> statistics for the engineer and scientist - Any help anyone could provide
> would be fantastic,
> Cheers
> Rob
>
> I am using the latest Octave (2.9.12 and the Optim package from
> Octave-Forge).
> --
> View this message in context:
> http://www.nabble.com/Curve-fitting---polynomial-fit-help-tf3818989.html#a10812300
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
Maybe you are using the returned polynomial coefficients from polyfit() in the
converse ordering. Is that of some help?
But again, what 'fit' does GNU Plot make? If it is a non-linear fit,
then I guess
we cannot compare the outputs with Octave. Nonlinear fits are very sensitive
to initial guess parameters; maybe you should play with them more.
Cheers,
Muthu
_________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in
Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Curve fitting - polynomial fit help SOLVED,
Rob Teasdale <=