Cody

Problem 852. Index of neighbor pixel with steepest gradient

Solution 2944849

Submitted on 14 Sep 2020 by 泽丰 张
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
dem = [1 5 9; ... 4 5 6; ... 8 7 3]; IX = [0 1 4; ... 1 1 9; ... 2 9 0]; assert(isequal(sgix(dem),IX))

2   Pass
dem = [1 5 4 9; ... 4 5 7 7; ... 6 6 6 8]; IX = [0 1 0 7; ... 1 1 7 7; ... 2 2 5 9]; assert(isequal(sgix(dem),IX))

Suggested Problems

More from this Author2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!