Plot 3D contours and surfaces with axes having the correct values?
3 ビュー (過去 30 日間)
古いコメントを表示
I figured out how to plot a 2D (x,y) array full of Z values, but how do I get MATLAB to plot the x,y coordinates on their respective axes?
0 件のコメント
採用された回答
Kevin Holly
2021 年 9 月 20 日
編集済み: Kevin Holly
2021 年 9 月 20 日
Are you trying to create a surf plot as shown below? where x and y are vectors of the coordinates.
%Generate Surf Plot
[xg, yg] = meshgrid(x,y);
surf(xg',yg',z)
その他の回答 (1 件)
Mike Jones
2021 年 9 月 21 日
1 件のコメント
Kevin Holly
2021 年 9 月 21 日
x = -15:1:15;
y = x
%Generate Surf Plot
[xg, yg] = meshgrid(x,y);
surf(xg',yg',z)
title('12.5" f/5 Windowed Newtonian - 2.6" Diagonal - 15x15mm FOV')
xlabel('X FOV (mm)')
ylabel('Y FOV (mm)')
view(0,90)
colorbar
colormap(jet)
%Generate Contour Filled
[xg, yg] = meshgrid(x,y);
contourf(xg',yg',z)
title('12.5" f/5 Windowed Newtonian - 2.6" Diagonal - 15x15mm FOV')
xlabel('X FOV (mm)')
ylabel('Y FOV (mm)')
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!