amforte / Topographic-Analysis-Kit

Set of matlab based tools for topographic analysis, built on top of TopoToolbox.
GNU General Public License v3.0
42 stars 35 forks source link

KsnChiBatch output issue? #27

Closed LarrySHLai closed 5 years ago

LarrySHLai commented 5 years ago

Hi, I am a beginner of KAT!

I tried following the manual with my DEM file, and everything went well until running KsnChiBatch. GRIDobj, FD, S are already produced before running it. All parameters are named as the same in manual. Here is my code and error messages:

[KSN_STREAM_GRID, ksn_ms, KSN_GRID, CHI_MAP, CHI_GRID] = KsnChiBatch(DEM,FD,A,S,'all')

Error using logical NaN's cannot be converted to logicals. Error in GRIDobj/crop (line 68) MASK = logical(varargin{1}.Z); Error in KsnChiBatch (line 323) KSNGrid=crop(KSNGrid,DEM,NaN);

[KSN_STREAM_GRID, ksn_ms] =KsnChiBatch(DEM,FD,A,S,'ksn')

One or more output arguments not assigned during call to "varargout". [KSN_STREAM_GRID, ksn_ms] =KsnChiBatch(DEM,FD,A,S,'ksn')

[CHI_MAP,CHI_GRID] = KsnChiBatch(DEM,FD,A,S,'chi')

The value of 'product' is invalid. Expected input to match one of these values: 'ksn', 'ksngrid', 'chimap', 'chigrid', 'all' The input, chi, matched more than one valid value. Error in KsnChiBatch (line 79) parse(p,DEM,FD,A,S,product,varargin{:}); Error in TAK_play (line 63) [CHI_MAP,CHI_GRID] = KsnChiBatch(DEM,FD,A,S,'chi')

[CHI_MAP] = KsnChiBatch(DEM,FD,A,S,'chimap')

One or more output arguments not assigned during call to "varargout". Error in TAK_play (line 64) [CHI_MAP] = KsnChiBatch(DEM,FD,A,S,'chimap')

[CHI_GRID] = KsnChiBatch(DEM,FD,A,S,'chigrid')

Error using logical NaN's cannot be converted to logicals. Error in GRIDobj/crop (line 68) MASK = logical(varargin{1}.Z); Error in KsnChiBatch (line 323) KSNGrid=crop(KSNGrid,DEM,NaN);

Thanks!!

Larry

amforte commented 5 years ago

The issue with 'chi' not being recognized and the errors regarding logicals are fixed in an updated version. The errors related to outputs arguments not being assigned are because you must tell the code you want outputs by setting 'output' to true.