Skip to content

define_input.m fails when .mat file contains only one tree #19

Description

@dluks

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));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions