help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Optimisation based on index of data


From: inor0627
Subject: Optimisation based on index of data
Date: Wed, 20 Jan 2016 03:18:01 -0800 (PST)

Hello list,

I have some 1D measuring data and try to find the subset with best
linearity. The following approach

lin_error = @(start_idx) range( detrend(
data(round(start_idx):round(start_idx)+interesting_length) ) );
start_opt = round(fminsearch(lin_error,guess));

works fine for some measurements, but in most cases fminsearch violates the
bounds of 'data' ('index out of bound') as the optimal subset is near the
end of 'data'.

So there are 2 questions:
Is fminsearch the right choice for this integer-type optimisation? I have a
bad feeling due to the resulting discontinuities in 'lin_error' when
rounding 'start_idx'. A google search for 'octave integer optimization'
didn't answer this question to me.
If fminsearch is ok for this task, how can I handle the bounds of 'data'?

Many thanks in advance,
Ingo



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Optimisation-based-on-index-of-data-tp4674457.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]