Area (and voume) of interpolated scattered data

1 view (last 30 days)
Hello,
I'd like to calculate the Area (and volume) of interpolated, scattered data. I have Lat/ Long coordinates for different altitudes. My code is as follows:
% Read data
clear all; close all;
Input = xlsread('Data Input Neu.xlsx','A:C');
Lat = Input(:,1);
Lon = Input(:,2);
Alt = Input(:,3);
% Interpolation for scattered data
F = TriScatteredInterp(Lon,Lat,Alt,'natural');
MinLat = min(Lat);
MaxLat = max(Lat);
MinLon = min(Lon);
MaxLon = max(Lon);
% Construct meshgrid
[X,Y] = meshgrid(MinLon:0.001:MaxLon,MinLat:0.001:MaxLat);
Z=F(X,Y);
% Specify z-levels
v = [910 910];
% Specify matrix for z-levels
C = contour(X,Y,Z,v);
My problem is to calculate the area for a given altitude (in my code for example 910). I have problems to read the contour matrix. I would like to calculate the Area with the following code (x and y are the contour coordinates for a given altitude):
area = areaint(x,y,referenceEllipsoid('GRS80','km'));
Is there a possibility to calculate the area for a given altitude with the code above (maybe from the contour matrix)?
(I also would like to calculate the volume between two altitudes: do you have an idea to calculate this volume?)
Thank you!

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!