I'm not sure which 3d plotting function would allow me plot elevation data as a function of GPS coordinates
1 回表示 (過去 30 日間)
古いコメントを表示
As stated above, I'm trying to find a 3d plotting function that allows me to plot elevation data vs map coordintes. I do not have any toolboxes for this purpose. I did this back in about 2006 or '07, but sadly that m-file was lost when a hard drive died. I ideally the function would allow colors to vary according to road grade. I only want to plot elevations for the points on the path.
Note that I'm not looking for help with my code. Importing data and then doing the analysis I want to do isn't a problem. It's just figuring out which 3d plotting function would achieve what I need. Also, the plot should be continuous and not discrete, interpolating between data points.
I've attached an image of a plot that mostly looks like what I'm trying to achieve, save for the reflection of the plot across the elevation=0 plane and the 2 grids.
Thanks in advance for any suggestions.
0 件のコメント
回答 (1 件)
Voss
2023 年 8 月 20 日
x = [0 1 2.5 2 3 4 3 4 4 5 5];
y = [0 1.5 2.5 4 5 5 6 7 6 6 7];
z = [0 1 2 3 5 6 6 8 8 9 11];
c = [0 diff(z)./sqrt(diff(x).^2+diff(y).^2)]; % color is road grade
x(2,:) = x;
y(2,:) = y;
z(2,:) = 0;
c(2,:) = c;
surface(x,y,z,c,'FaceColor','interp')
view([-80 45])
box on
grid on
xlabel x
ylabel y
zlabel z
colormap([summer; flip(autumn,1)])
colorbar
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!