How to calculate the area under a curve in km^2?

조회 수: 2 (최근 30일)
GIACOMO MELCHIORI
GIACOMO MELCHIORI 2023년 5월 22일
댓글: Torsten 2023년 5월 22일
Hello everyone!
I am a geologist working on this area of the Moon characterized by this fault-related landforms (see image), for some future calculations I need to know the so-called "excess area", so I need to quantify in m^2 or km^2 the area under the red line (this is a topographic profile across one of the above-mentioned structures) and above the black line whiich is my reference level. Since I am working on a GIS-based software with a known coordinate system I can measure all the distances I want to have a reference for calculation.
I read in a paper that "cross-sectional area of ridges was calculated from each profile by using a trapezoidal numerical integration" but I really don't know where to start...
Thank you in advance,
Jack
  댓글 수: 3
GIACOMO MELCHIORI
GIACOMO MELCHIORI 2023년 5월 22일
I can extract these coordinates I think
Torsten
Torsten 2023년 5월 22일
Then
trapz(x,y-ybase)
is the area where x and y are as above and ybase is the y-coordinate of the black line.
The unit of the area will be [unit_x]*[unit_y].

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

채택된 답변

Nathan Hardenberg
Nathan Hardenberg 2023년 5월 22일
편집: Nathan Hardenberg 2023년 5월 22일
Check out the trapz-function (https://de.mathworks.com/help/matlab/ref/trapz.html). This is exactly what you need.
You have to cut of the data from your starting point to your endpoint. And your "black line" has to be 0 level. because the trapz-function is just integrating numerically. If your data is not euqally spaced, you can also provide this in the function (see documentation)
% creating radom data
y = zeros(1,20);
y(5:14) = rand(1,10)+5
y = 1×20
0 0 0 0 5.0174 5.1231 5.1924 5.7921 5.4807 5.5166 5.2084 5.1917 5.7500 5.7148 0 0 0 0 0 0
plot(y); % visualizing
xline(4, '--');
xline(15, '--');
y_cut = y(4:15); % cutting off data
area = trapz(y_cut)
area = 53.9872

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mining Geology에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by