Code covered by the BSD License
-
border_nans(E)
border_nans Find NaNs connected to the DEM border
-
dem_flow(E, d1, d2)
dem_flow Downslope flow direction for a DEM
-
dependence_map(E, T, arg3, ar...
dependence_map Dependence map for pixel flow in a DEM
-
facet_flow(e0, e1, e2, d1, d2...
facet_flow Facet flow direction
-
fill_sinks(E)
fill_sinks Fill interior sinks in DEM
-
flow_matrix(E, R, d1, d2)
flow_matrix System of linear equations representing pixel flow
-
influence_map(E, T, arg3, arg...
influence_map Influence map for pixel flow in a DEM
-
pixel_flow(E, i, j, d1, d2)
pixel_flow Downslope flow direction for DEM pixels
-
postprocess_plateaus(A, E)
postprocess_plateaus Replace upslope areas for plateaus with mean value
-
test_border_nans
Steven L. Eddins
-
test_dem_flow
Steven L. Eddins
-
test_dependence_map
Steven L. Eddins
-
test_facet_flow
Steven L. Eddins
-
test_fill_sinks
Steven L. Eddins
-
test_flow_matrix
Steven L. Eddins
-
test_influence_map
Steven L. Eddins
-
test_pixel_flow
Steven L. Eddins
-
test_postprocess_plateaus
Steven L. Eddins
-
test_upslope_area
Steven L. Eddins
-
test_vis_dem_flow
Steven L. Eddins
-
test_vis_map
Steven L. Eddins
-
upslope_area(E, T)
upslope_area Upslope area measurements for a DEM
-
vis_dem_flow(E, R, S)
vis_dem_flow Visual pixel flow directions and magnitude on a DEM
-
vis_map(M, E, arg3, arg4)
vis_map Visualize influence or dependence map on a DEM
-
Contents.m
-
View all files
from
Upslope area functions
by Steve Eddins
Functions for computing and visualizing upslope area, influence map, dependence map
|
| test_border_nans
|
function suite = test_border_nans
% Steven L. Eddins
% Copyright 2007-2009 The MathWorks, Inc.
initTestSuite;
%===============================================================================
function test_typical_case
E = [NaN 0 0 0 0
0 NaN 0 NaN 0
NaN 0 0 0 0
0 0 0 0 NaN];
result = border_nans(E);
expected_result = logical([1 0 0 0 0
0 1 0 0 0
1 0 0 0 0
0 0 0 0 1]);
assertEqual(result, expected_result);
%===============================================================================
function test_no_border_nans
E = [1 2 3 4 5
6 7 8 9 10];
result = border_nans(E);
expected_result = false(size(E));
assertEqual(result, expected_result);
%===============================================================================
function test_empty_input
% If input is empty, output should be a logical empty with the same size.
E = zeros(1, 0, 3);
result = border_nans(E);
expected_result = false(size(E));
assertEqual(result, expected_result);
|
|
Contact us at files@mathworks.com