wschwanghart / topotoolbox

A MATLAB software for the analysis of digital elevation models -
https://topotoolbox.wordpress.com/
153 stars 89 forks source link

Trouble using the example workflow: Calculate river steepness #27

Closed elisham98 closed 1 year ago

elisham98 commented 1 year ago

Hello,

My name is Elisha and I am a graduate student. I've recently started using topotools to aid with my research but I am inexperienced with machine languages. When trying to use the workflow from the cheatsheet I receive this error:

DEM = GRIDobj('KigoDEM.tif'); DEMf = resample(DEM,30); FD = FLOWobj(DEMf); S = STREAMobj(FD,'minarea',1000); Error using FLOWobj/flowacc Error: File: flowacc.m Line: 101 Column: 28 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

Error in STREAMobj (line 154) W = flowacc(FD) >= minarea;

Now before this Matlab was crashing and I was receiving a segmentation violation. But after coming to GitHub I saw the quickest solution was to remove the mexfiles due to my using a MacBook. But following that debacle, I now receive this message. How can I solve this?

Thanks, E

wschwanghart commented 1 year ago

Hi, this is weird. Is it possible that you are using an outdated version of TT? Line 101 in flowacc.m is a comment. The issue with new MacOS has been dealt with here: https://github.com/wschwanghart/topotoolbox/issues/19 Hope this works. Best regards, Wolfgang

elisham98 commented 1 year ago

Thanks the problem was in fact that I was using an outdated version of TT.