When a .mat file contains only one tree, nt is equal to 1 and so define_input never assigns the cloud to P.
|
%% Estimate the PatchDiam and BallRad parameters |
|
for i = 1:nt |
|
if nt > 1 |
|
% Select point cloud |
|
P = matobj.(names{i}); |
|
inputs(i) = Inputs; |
|
inputs(i).name = names{i}; |
|
inputs(i).tree = i; |
|
inputs(i).plot = 0; |
|
inputs(i).savetxt = 0; |
|
inputs(i).savemat = 0; |
|
inputs(i).disp = 0; |
|
end |
This results in an error on line 89:
%% Estimate the stem diameter close to bottom
% Define height
Hb = min(P(:,3));
When a .mat file contains only one tree,
ntis equal to 1 and sodefine_inputnever assigns the cloud toP.TreeQSM/src/tools/define_input.m
Lines 73 to 85 in 6630bbf
This results in an error on line 89: