1 %> @brief Applies sigmoid window to curves
3 %> Kills smoothly values above and below range.
5 %> the x* values are relative to data vars x. They are converted to indexes.
7 %> Applies a window
for the coefficients to have smooth transition
8 %> between their current values and zero.
9 %> I chose the sigmoid
function 1/(1+e^(k*x)) because it is easy to use.
11 %> @sa sigwindow.m, uip_pre_sigwindow.m
14 %> beginning and terminus of window, given in data.fea_x units
16 %> length
for sigmoid to go from 0.5 to .995 or .005 given in data.fea_x units
22 o.classtitle = 'Sigmoid Window';
27 methods(Access=protected)
30 %> Applies
block to dataset
31 function data = do_use(o, data)
34 range_ = data.fea_x([1, end]);
41 x_per_fea = abs((data.fea_x(end)-data.fea_x(1))/(data.nf-1)); % features may not be equally spaced along the x axis, this is a good average though
42 idxs_range =
v_x2ind(range_, data.fea_x); % features not to be zeroed
43 scale = o.width/x_per_fea;
function v_x2ind(in v, in x)
Pre-processing block base class.
function sigwindowuni(in X, in idxcentre, in scale)
Applies sigmoid window to curves.