Commit ba0132f5 authored by Pierre Cazenave's avatar Pierre Cazenave

Move array out of loop as it is constant across iterations.

parent cb39c6ca
......@@ -330,11 +330,11 @@ for ii = 1:numvars
ss = 0:1 / (nt - 1):1; % scale from 0 to 1.
% Use the first modelled time step.
startdata = squeeze(data(:, :, 1));
td = indata.(fnames{vv}) - startdata;
for tt = 1:nt
if tt == 1
sfvdata(:, :, 1) = startdata;
else
td = indata.(fnames{vv}) - startdata;
sfvdata(:, :, tt) = startdata + (ss(tt) .* td);
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