# forum.alglib.net

ALGLIB forum
 It is currently Tue Jun 28, 2022 2:26 am

 All times are UTC

### Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: lsfitlinear - fit non linear function via basis functionPosted: Mon Sep 07, 2020 1:32 pm

Joined: Mon Sep 07, 2020 12:08 pm
Posts: 1
Hello everyone,
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?

Thanks!

Top

 Post subject: Re: lsfitlinear - fit non linear function via basis functionPosted: Mon Oct 05, 2020 9:29 am

Joined: Wed May 06, 2020 3:34 pm
Posts: 3
Can you provide a part of your code so that one can see how you're doing it?

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

 All times are UTC