File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 2424% Examples
2525%
2626% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
27- % FD = FLOWobj(DEM,'preprocess','c' );
27+ % FD = FLOWobj(DEM);
2828% S = STREAMobj(FD,flowacc(FD)>1000);
2929% D = DIVIDEobj(FD,S);
3030% subplot(1,2,1)
3131% plot(D)
32+ % axis image
3233% D2 = cleanedges(D,FD);
3334% subplot(1,2,2)
3435% plot(D2)
36+ % axis image
3537%
3638% See also: DIVIDEobj, DIVIDEobj/divnet
3739%
Original file line number Diff line number Diff line change 2828% Examples
2929%
3030% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
31- % FD = FLOWobj(DEM,'preprocess','carve' );
31+ % FD = FLOWobj(DEM);
3232% FA = flowacc(FD);
3333% ST = STREAMobj(FD,FA>500);
3434% D = DIVIDEobj(FD,ST);
Original file line number Diff line number Diff line change 3232% Example
3333%
3434% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
35- % FD = FLOWobj(DEM,'preprocess','c' );
35+ % FD = FLOWobj(DEM);
3636% ST = STREAMobj(FD,flowacc(FD)>1000);
3737% D = DIVIDEobj(FD,ST);
3838% D = divorder(D,'topo');
Original file line number Diff line number Diff line change 4747% Example
4848%
4949% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
50- % FD = FLOWobj(DEM,'preprocess','c' );
50+ % FD = FLOWobj(DEM);
5151% ST = STREAMobj(FD,flowacc(FD)>1000);
5252%
5353% figure
116116% Parse
117117parse(p ,varargin{: });
118118
119+ if ischar(p .Results.colormap)
120+ cmap = validatecolor(p .Results.colormap);
121+ else
122+ cmap = p .Results.colormap;
123+ end
124+
125+
119126% default values
120127if isempty(p .Results.style)
121128 if not(isempty(D .order))
168175 mindo = min(uqdo );
169176 a = (siz(2 )-siz(1 ))/(maxdo - mindo );
170177 b = siz(1 )-a * mindo ;
171-
178+
172179 % Colormap
173- rgb = num2rgb(uqdo ,p .Results.colormap ,[mindo maxdo ]);
180+ rgb = num2rgb(uqdo ,cmap ,[mindo maxdo ]);
174181end
175182
176183[x ,y ] = ind2coord(D ,D .IX(ix ));
Original file line number Diff line number Diff line change 2525% Example
2626%
2727% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
28- % FD = FLOWobj(DEM,'preprocess','c' );
28+ % FD = FLOWobj(DEM);
2929% ST = STREAMobj(FD,flowacc(FD)>1000);
3030% D = DIVIDEobj(FD,ST);
3131% D = divorder(D,'topo');
Original file line number Diff line number Diff line change 3434% Example
3535%
3636% DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
37- % FD = FLOWobj(DEM,'preprocess','c' );
37+ % FD = FLOWobj(DEM);
3838% ST = STREAMobj(FD,flowacc(FD)>1000);
3939% D = DIVIDEobj(FD,ST);
4040% D2 = shrink(D,FD,1000);
4141% subplot(2,1,1)
42- % plot(D,'color','k' )
42+ % plot(D)
4343% axis image
4444% subplot(2,1,2)
45- % plot(D2,'color','r' )
45+ % plot(D2)
4646% axis image
4747%
4848% See also: DIVIDEobj, DIVIDEobj/plot
Original file line number Diff line number Diff line change 7575[X ,Y ] = getcoordinates(DEM ,' matrix' );
7676qz = F(X(: ),Y(: ));
7777
78-
79- OUT = GRIDobj( DEM ,resize( qz , DEM .size) );
78+ OUT = GRIDobj( DEM , ' double ' );
79+ OUT .Z( : ) = qz( : );
8080OUT .Z(OUT .Z> maxdist | OUT .Z< mindist ) = nan ;
8181
Original file line number Diff line number Diff line change 195195
196196if options .mingradient~= 0
197197 b = zeros(n ,1 );
198- b(S .ix) = - p .Results .mingradient;
198+ b(S .ix) = - options .mingradient;
199199else
200200 b = sparse(n ,1 );
201201end
You can’t perform that action at this time.
0 commit comments