plot depth values for each location (latitude, longitude)
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hello everyone!
I have three vectors ( 14084 x 1 double format) that contain respectively latitude, longitude and depth values. I would like to plot the depth values for each pair of lat and long values.
Can anybody help me?
Thank you a lot in advance
Antworten (1)
Divyajyoti Nayak
vor etwa eine Stunde
I assume you want to get a spherical plot with elevations from your data. To do so, the 'surf' function can be used once the data has been properly formatted in the form of a grid rather than 1-D vectors. The 'sphere' functio can be used to understand how the data needs to be formatted. Here's some sample code to help you out along with some relevant documentation:
lats = -90:1:90;
lons = 0:4:360;
[lats, lons] = meshgrid(lats,lons);
elevation = rand(size(lats))/5;
R = 15; %Radius of sphere.
X = (R+elevation).*cosd(lats).*sind(lons);
Y = (R+elevation).*cosd(lats).*cosd(lons);
Z = (R+elevation).*sind(lats);
surf(X,Y,Z);
axis equal;
0 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!