Minimum and location of minimum through interpolation [message #79069] |
Mon, 30 January 2012 00:33 |
elias
Messages: 13 Registered: April 2005
|
Junior Member |
|
|
Hi all,
I have the following problem that I am a bit stuck with:
I have two 1D-arrays: the first contains data of a parameter, I call here x, the second contains the standard deviations of solutions that I get for some equations, for each corresponding x-value.
I want to do the following:
a) extract the x-value for the case that the standard deviation is minimum
b) find the range of x-values where standard deviations do not exceed that minimum value by e.g. 10%
c) If there are more than one local minima, I want to locate this 10% level only around the local minimum of the minimum value
Here is where the problem are:
Due to undersampling, the actual minimum standard deviation may occur between two x-values, so I want to determine this through interpolation. That is not so difficult, but one additional problem is that "x" is an angle, so I can have jumps from 360 deg to 0 deg. If the mimimum is around eg. 358 deg and I have undersampling, interpolation may give me a result of ~180 deg, which is obviously wrong.
The same problem occurs when trying to solve (b). 10% levels may also occur at locations that I dont have data points, so I need to find the result by interpolation. which is tricky when there are discontinuities in x.
So far, I tried converting the angle to sines and cosines (to avoid discontinuities), but then I get a bit lost with trying to deal with several local minima, sorting the data (in order to allow interpolation to work) etc.
So, any advice on how to deal with this problem, is welcome.
Thanks a lot in advance!
|
|
|