Path: SpacecraftEstimation/StellarAttDet
% SEARCHKVECTOR Implement the range searching of data using a k vector. The output are the indices into the sorted data that are guaranteed to include the interval, [ya,yb]. There may be additional data points outside this interval. k1 and k2 guarantee that: y(k1) < y(a) yb < y(k2) Note that the data itself is not an input to this function. There is no searching within the data; only the line parameters m and q are needed to find the indices in k which bracket the desired interval. -------------------------------------------------------------------------- Form: [k1,k2] = SearchKVector(k,q,m,y1,y2) -------------------------------------------------------------------------- Inputs ------ k (1,:) Set of integer indices m (1,1) Slope of linear fit q (1,1) Intercept of linear fit y1 (1,1) Start value for interval y2 (1,1) Final value for interval Outputs ------- k1 (1,1) Start index for interval k2 (1,1) Final index for interval See also: CreateKVector --------------------------------------------------------------------------
Back to the SpacecraftEstimation Module page