Hello,

I got a problem that I'm working on for quite some times.

I have several complete range of values (let say Zs) that each varies based on X and Y coordinates (time and length)

I want to use the values of Zs and creating a new function (let say W) that will present maximums at some specific Xs.

The X coordinates of the maximums of the new function known and varies depending on each Y.

Presently, I am using a regression with several iterations. I am using only 1 and 0 for the first iteration; 1 being the points were I know the maximums are and 0 for all the others.

On the other iterations, I am making an average between the 0 and 1 matrix and the results of the obtained function.

My problem is that: a) the maximums drift from one X to another one next to it, and b) I do not obtain as many maximums as what I was expecting

I am presently using a function like this one: W = A + B(z1) + C(z1^2) + D(z1^3) + E(z2) + F(z2^2) + G(z2^3) + ...

Should I use another function type ?

I am open to any suugestion ...