DIVIDEobj problem? #43
Closed
Richard-Ott
started this conversation in
General
Replies: 2 comments
-
Thanks, Richard, for spotting that bug. It's indeed related to a change of the "sub2ind" function on Matlab's side in release 2024a. We'll take care of this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have updated |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Wolfgang and others,
I got contacted today by someone who did my short course and got the following error running the DIVIDEobj:
Error using sub2ind (line 71)
Out of range subscript.
Error in GRIDobj/coord2ind (line 81)
IX(I) = sub2ind(DEM.size,IX2(I),IX1(I));
Error in getdivide (line 67)
allix = coord2ind(DG,allx,ally);
Error in DIVIDEobj (line 147)
MS = getdivide(MS,IX,FD);
I then tried running the standard DIVIDEobj script myself:
DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
FD = FLOWobj(DEM);
ST = STREAMobj(FD,'minarea',1000);
D = DIVIDEobj(FD,ST);
and I got the same error. I tried to track down th error and seemed like there was a problem that every X and Y coordinate vector of a polygon in a DB polygon file ended with a NaN coordinate. I recently updated to Matlab 2024a. Maybe the problem lies somewhere in the update. Or am I missing someting obvious?
Cheers,
Richard
Beta Was this translation helpful? Give feedback.
All reactions