From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>

Date: Sat Dec 28 2013 - 08:26:49 MST

Date: Sat Dec 28 2013 - 08:26:49 MST

As noted in the documentation:

n

The number of coefficients desired (i.e., n-1 will be the degree of the

polynomial). Due to the method used, n should be less than or equal to

five.

===

In your case with 3 points, the max number of coefficients would be 2

On 12/28/13, 5:01 AM, Richard Liang wrote:

*>
*

*>
*

*> From: richardljy@hotmail.co.uk
*

*> To: ncl-talk@ucar.edu
*

*> Subject: lspoly didn't wok when the number of data points equal to the number of coefficients
*

*> Date: Sat, 21 Dec 2013 15:45:08 -0500
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*>
*

*> lspoly didn't wok when the number of data points equal to the number of coefficientsI did the test
*

*> x = (/-4.5, -3.2, -1.4/)y = (/ 0.7, 2.3, 3.8/)n = 3 c = lspoly(x,y, 1, n) print(c)c will be(0) 1e+20(1) 1e+20(2) 1e+20
*

*>
*

*>
*

*> But if n=2 c will be(0) 5.268707(1) 0.9896836
*

*> I also did the test in the 4 element array, when n=4, it didn't work. only when n is less than the number of data points
*

*> Any body help me? thanks
*

*>
*

*>
*

*>
*

*>
*

*> _______________________________________________
*

*> ncl-talk mailing list
*

*> List instructions, subscriber options, unsubscribe:
*

*> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>
*

_______________________________________________

ncl-talk mailing list

List instructions, subscriber options, unsubscribe:

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Sat Dec 28 08:29:28 2013

*
This archive was generated by hypermail 2.1.8
: Mon Jan 06 2014 - 13:02:22 MST
*