I am not necessarily looking for the 100% right answer, maybe rather get feedback on how to approach solving this or what areas of mathematics to research to solve this type of problem. If this is not appropiate place to post this, feel free to flag/remove it. Thank you.
I have two different signals:
And their superposition is
I want to solve the coefficients a and b, so that the maximum value of the superposition, c, and the index where that value occurs, idx, is fixed. So for example, c would be 100 and idx = 106.
Some type of iteration is needed, but what would be the optimal way to do it? I can only think of two for loops that would loop over all the values of a and b (the range would be something like [0 1000] with steps of 0.1), and finding the closest approximation, by comparing to the best previous value we have stored.