Re: plotting polyfit
- From: Madiha <madiha.jafri@xxxxxxxxx>
- Date: Fri, 5 Aug 2005 10:26:38 -0400
Hi Steve, Thanks for your reply!
I tried both "format long" as well as "y = p(1)*x.^4 + p(2)*x.^3 ..."
as you suggested... but still, the same, consistent wrong plot.
You're right in that the portions of the coefficients matter... my
desired plot should have a y-axis range from 1 to 4 with a decreasing
sloped curve, but in the undesired plot, the y-axis ranges from 0 to
1e38!!!! AND the curve is INCREASING almost exponentially!
sigh... please let me know if you or anyone else has any
suggestions!! I will be more than happy to send my code if this
sounds too confusing... Thanks again for your input!
-: Madiha :-
Steven Lord wrote:
>> 0.0145 -0.0211 -0.0005 -0.0493 2.7644
>
> Those aren't the coefficients from p. Those are how the
> coefficients from p
> were displayed in FORMAT SHORT, which is the default display
> format. Try
> using FORMAT LONG G or, better yet, define:
>
> y = p(1)*x.^4 + p(2)*x.^3 ...
>
> and see if that looks closer to the results from POLYVAL. The
> portions of
> the coefficients that you don't see with FORMAT SHORT are very
> small, but
> when you're multiplying the coefficient of the quartic term by
> something on
> the order of 2.7e42 [(4.05e10)^4]... those missing parts make a
> difference.
>
> --
> Steve Lord
> slord@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: plotting polyfit
- From: Tom Lane
- Re: plotting polyfit
- References:
- plotting polyfit
- From: Madiha
- Re: plotting polyfit
- From: Steven Lord
- plotting polyfit
- Prev by Date: Re: Saving vectors to be used in textio
- Next by Date: Re: Suppress handles overview to command window
- Previous by thread: Re: plotting polyfit
- Next by thread: Re: plotting polyfit
- Index(es):
Relevant Pages
|