forum.alglib.net
http://forum.alglib.net/

curve fitting 3rd time lucky
http://forum.alglib.net/viewtopic.php?f=2&t=576
Page 1 of 1

Author:  slap [ Tue May 08, 2012 9:23 pm ]
Post subject:  curve fitting 3rd time lucky

Please could someone hlep me with my last post on curve fitting? I just need some guidance or an example of how to formulate a curve fitting problem like this - I'm not even certain if the lsfit routines are the ones I should be trying to figure out how to use for the type of problem I have.

in the simplest terms I can think of I have a measured curve of points x,y

eg the 3 points (1,1), (2,7), (3,4)

I want to fit this curve as a weighted sum of other (constant) curves.

For example with the two curves below

x y x y
1 0 1 1
2 3.5 2 0
3 1 3 2

the y values of the measured curve could be fit exactly by multiplying the set of y values for the first constant curve by 2 and adding 1 times the second set of y values.

My question then is how to formulate this in lsfitcreate? (if that is how it should be done?)

apologies if this is a really basic question but I'm not a mathamatician or a programmer - but I am eager to learn

thanks in anticipation

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/