![]() |
| | #1 |
| Registered User Join Date: Mar 2009
Posts: 2
| i have done Delphi programming before and we have done many programming this semester. But now i have a multitask project to write and a part of it SHOULD be in C! will you please help me how to deal with a small part of this part ) (i am just learning C and this should be ready by this Friday!)I should use a LAPACK library. i found "dpotrf" that i think matches... I had attached the description. i don't need to be worry about reading data, i can just plug them inside the code (they are only 10 points). But can some one please tell me how to write the normal equations in matrix form? what does that mean at all!? this is what i should do: i have to write a program that computes a 4th order polynomial fit to a given data set that i can enter inside the code. 1- write the problem in terms of a least squares (LS) problem in matrix form 2- write the normal equations in matrix form 3-solve the normal equations by Cholesky decomposition followed by the solution of a triangular system of equations. Use LAPACK library. 4-print the coefficients of the polynomial 5-print the value of the interpolating polunomial at a set of regularly spaced points covering the interval in which the data is defined this is what i wrote...and i think i am confused by the concept of what i should do! Code: ***************************
typedef struct seq_ls {
double * w; /* solution of A*w = b */
/*********
Appends line u at bottom of X and bn at bottom of b, and consenquently
updates w.
**********/
int (*append_line) (struct seq_ls *self, double * u, double bn);
int (*remove_line) (struct seq_ls *self, int i);
int (*mul_Av) (struct seq_ls *self, double * v, double *dst);
int (*mul_vX) (struct seq_ls *self, double * v, double *dst);
int (*delete) (struct seq_ls *self);
void *private;
} *seq_ls_t;
seq_ls_t new_seq_ls (int X_width, int X_max_height);
Last edited by astrosona; 03-03-2009 at 07:42 PM. |
| astrosona is offline | |
| | #2 |
| Registered User Join Date: Mar 2009
Posts: 2
| ok.....i am done with this....!!! no worries! |
| astrosona is offline | |
![]() |
| Tags |
| c programming, least squares, ls problem |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can any1 plz make this assignment | jean | C Programming | 17 | 05-13-2009 09:19 PM |
| Simple message encryption | Vicious | C++ Programming | 10 | 11-07-2004 11:48 PM |
| Matrix Multiplication with simple syntax! plz help. | codebox | C Programming | 6 | 11-05-2004 09:03 AM |
| Binary Search Trees Part III | Prelude | A Brief History of Cprogramming.com | 16 | 10-02-2004 03:00 PM |
| Need help with simple DAQ program | canada-paul | C++ Programming | 12 | 03-15-2002 08:52 AM |