Commit 815a77eb authored by Pierre Cazenave's avatar Pierre Cazenave

Reinstate the preallocation of the output array in the case for which no valid...

Reinstate the preallocation of the output array in the case for which no valid stations are found. Not having this causes the if ~isempty(out) a bit later to fail, bringing the whole thing crashing down (or at least stopping the script).
parent 01cfefab
......@@ -74,7 +74,7 @@ else
end
inc = 1;
% out = cell(nPos, 1);
out = cell(nPos, 1);
for s=1:nPos
[node, dist] = find_nearest_pt(Positions(s, cols(1)), Positions(s, cols(2)), Mobj);
......
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