Re: poly_fit - yband [message #87984 is a reply to message #87976] |
Mon, 10 March 2014 07:20   |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
On Saturday, March 8, 2014 7:43:00 AM UTC-5, sid wrote:
> Hello everyone,
>
> I have x 80 integer values and y 80 values.
>
> I did,
>
> p=poly_fit(x,y,7,yband=e,yfit=y1)
>
>
>
> now I need y values at every 0.33 intervals so, now I have x with 238 values with 0.33 resolution earlier case the resolution was 1.
>
> Now for this 238 x values I have found 238 y values using the polynomial coefficients.
>
> But now the problem is how to find the error values, since I have yband = e (80 values). But I need to find the error values for all the 238 values.
>
>
>
> Is there a way to do this.
>
> Please do help me out in this regard.
>
>
>
> thanking you in advance
>
> sid
I had to do this for something: I had a set of (x,y,dy) variables to which I fit a polynomial. But then I wanted to make a scatter plot of those data with the best fitting polynomial overplotted and a shaded region showing the range of best fitting polynomials. Of course the model and shaded region can be computed at arbitrary resolution, and so poly_fit does not have a simple means of this. I agree, interpolating is a bad idea. So, why not just read the poly_fit.pro code? That's what I did. It's only about 7 lines worth of rather basic IDL to wade through. In your standard call to poly_fit, you'll need to return the covariance matrix and then do a few basic calculations. It's pretty easy actually...
|
|
|