InverseTampere / TreeQSM

Quantitative Structure Models of Single Trees from Laser Scanner Data
Other
148 stars 46 forks source link

Array indices must be positive integers or logical values. #15

Open AnthoineResea opened 1 year ago

AnthoineResea commented 1 year ago

Sometimes, when i run the code, i return this error. I dont' know what is related, since it only appears sometimes (same code, same parameters, same dataset)

Array indices must be positive integers or logical values.

Error in surface_coverage (line 85)
  Cov(LexOrd) = 1;

Error in least_squares_cylinder (line 183)
  SurfCov = surface_coverage(P,Axis',Point',nl,ns,0.8*cyl.radius);

Error in cylinders>cylinder_fitting (line 368)
            c = least_squares_cylinder(Q0,c0,W,Q);

Error in cylinders (line 173)
      [cyl,Reg] = cylinder_fitting(P,Points,IndPoints,nl,si);

Error in treeqsm (line 315)
      cylinder = cylinders(P,cover2,segment2,Inputs);

Error in Untitled2 (line 26)
    QSM = treeqsm(P, inputs);