Commit c61a60e2 authored by Philipp Schäfer's avatar Philipp Schäfer

ita_interpolate_spk_result

When extrapolating with zeros or const value
-now extrapolates all values outside the data range instead of rounding frequency before
parent 92e77ef8
......@@ -72,13 +72,13 @@ end
%% Extrapolation
if ~isempty(extrapLow)
idxOverwriteLow = ceil(newFreqs) < data.freqVector(1);
idxOverwriteLow = newFreqs < data.freqVector(1);
if any(idxOverwriteLow)
newFreqData(idxOverwriteLow, :) = repmat(extrapLow, sum(idxOverwriteLow), 1);
end
end
if ~isempty(extrapHigh)
idxOverwriteHigh = floor(newFreqs) > data.freqVector(end);
idxOverwriteHigh = newFreqs > data.freqVector(end);
if any(idxOverwriteHigh)
newFreqData(idxOverwriteHigh, :) = repmat(extrapHigh, sum(idxOverwriteHigh), 1);
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment