lim83
08-30-2010, 01:33 AM
hi,
i refer to the amoeba.c routine found on page 504 of the text.
i am hoping to implement this downhill simplex routine in my own code. basically, i have an image with a few million pixels, whereby each pixel has 8 data pairs, ie (x1,y1), (x2,y2)...(x8,y8). i have a (rather complicated) model function which is a function of x (ie 1-dimension) and 8-9 parameters which i have to vary and find those that yield the best fit with the data. that means i have to run amoeba.c as many times as there are pixels.
i have quite a bit of trouble trying to understand how this routines works. can anyone pls tell me how i can go about implementing amoeba.c? specifically,
1. where in the routine do i enter my model function?
2. do i simply provide the model function, or do i provide the merit function (ie a summation of the square differences between the model and data)?
3. how do i feed the 8 data pairs of each pixel to the program during run-time?
thanks for any help!
i refer to the amoeba.c routine found on page 504 of the text.
i am hoping to implement this downhill simplex routine in my own code. basically, i have an image with a few million pixels, whereby each pixel has 8 data pairs, ie (x1,y1), (x2,y2)...(x8,y8). i have a (rather complicated) model function which is a function of x (ie 1-dimension) and 8-9 parameters which i have to vary and find those that yield the best fit with the data. that means i have to run amoeba.c as many times as there are pixels.
i have quite a bit of trouble trying to understand how this routines works. can anyone pls tell me how i can go about implementing amoeba.c? specifically,
1. where in the routine do i enter my model function?
2. do i simply provide the model function, or do i provide the merit function (ie a summation of the square differences between the model and data)?
3. how do i feed the 8 data pairs of each pixel to the program during run-time?
thanks for any help!