ALGLIB forum
It is currently Wed Sep 23, 2020 11:26 pm

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.

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: lsfitlinear - fit non linear function via basis function
PostPosted: 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?


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group