How can I get slope from DEM data?

Hi, I'm undergraduate student from Yonsei University, Seoul. I have a question about MATLAB.
I have a DEM data like this picture.
Each row and column indicates the length of data set(1952X2101), and each value means elevation.
I want to calculate the slope of radom radial degree.
If I put random radial degree like 45 degree(0-90 degree), MATLAB shows slope like 0.08 (in ratio)
How can I make this one?
Thanks for reading.

댓글 수: 4

darova
darova 2021년 3월 2일
I don't understand the question. Can you please explain more?
HyoJae Lee
HyoJae Lee 2021년 3월 3일
편집: HyoJae Lee 2021년 3월 3일
Sorry that I'm not good at English.
For example, there is a matrix 5X5 like
1 2 4 8 10
1 2 4 8 10
1 2 4 8 10
1 2 4 8 10
1 2 4 8 10
this value means elevation of each point.
I choose starting point (1,1) --> 1. then, I put radial degree like 45. In this case, slope will be 1.697.
If I put radom radial degree like 60, how can I get radial slope from this data?
KSSV
KSSV 2021년 3월 3일
(1,1) --> 1. then, I put radial degree like 45. In this case, slope will be 0.4.
How slop is 0.4? To get slope you need two points right? What is other point?
HyoJae Lee
HyoJae Lee 2021년 3월 3일
편집: HyoJae Lee 2021년 3월 3일
Oh, I was totally wrong. Sorry, It is 1.697056...
I calculated slope by y's rate of change / x's rate of change.
y can be 1 2 4 8 10.
and x is row(or column) number 1 2 3 4 5 * square root 2. (In 45 degree, data length of each point will be increased by square root 2)
I want to get the entire radial slope, not just two points, which has starting point of (1,1).
This picture might help. (This picture is visualization of the matrix.)
Thanks for helping me.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Just for fun에 대해 자세히 알아보기

질문:

2021년 3월 2일

편집:

2021년 3월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by