|lsfitlinear - fit non linear function via basis function
|Page 1 of 1|
|Author:||gianfr90 [ Mon Sep 07, 2020 1:32 pm ]|
|Post subject:||lsfitlinear - fit non linear function via basis function|
I'd like to use the lsfitlinear C++ function to fit a fourth order polynomial on my input data X=(x1,x2) that are in R^2.
I set the y vector to contain the N sample values (expermiental data) and the FMatrix (NxM) to contain the basis function that is the fourth order polynomial of each input sample. So a generic row of FMatrix is: [1, x1, x2, x1^2, x2^2, x1x2, x1^3, x2^3, x1x2^2, x2x1^2, x1^2x2^2, x1^3x2, x2x1^3, x1^4, x2^4].
The lsfitlinear() function returns ok but the coefficient vector contains all 0's.
Could anyone tell me if I'm wrongly setting the problem up?
|Author:||Bbllaaddee [ Mon Oct 05, 2020 9:29 am ]|
|Post subject:||Re: lsfitlinear - fit non linear function via basis function|
Can you provide a part of your code so that one can see how you're doing it?
|Page 1 of 1||All times are UTC|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group