Commit f1b7328c authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

jri: ita_extend_dat speed improvement (~ 40%)

parent 8569e936
......@@ -79,11 +79,13 @@ else
%extend data
number_zeros = new_number_samples - asData.nSamples;
newSize = size(asData.time);
newSize(1) = number_zeros;
newSize(1) = new_number_samples;
if sArgs.nozero
asData.time = [asData.time; bsxfun(@times,ones(newSize,asData.dataTypeOutput),asData.time(end,:))];
else %normal case
asData.time = [asData.time; zeros(newSize,asData.dataTypeOutput)];
tmp = zeros(newSize,asData.dataTypeOutput);
tmp(1:asData.nSamples,:) = asData.time;
asData.time = tmp;
end
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