How to plot a cross-section of a surface plot
29 ビュー (過去 30 日間)
古いコメントを表示
I have a 3D plot that's generated by 3 900x900 matrices X,Y,Z. I want to plot the Z values at X==300micros(note:matrix dimension has nothing to do with values of X dimension) for all values of Y.
Any Idea how I could do this?
0 件のコメント
採用された回答
Fangjun Jiang
2011 年 8 月 5 日
I think the function you are looking for is interp2(). For example:
M=10;
N=10;
X=-1:1/M:1;
Y=-1:1/N:1;
Z=membrane(1,M,N);
figure(1);surf(X,Y,Z);
x=0.3;
z=interp2(X,Y,Z,x,Y);
figure(2);plot(Y,z);
その他の回答 (1 件)
Jul Smith
2012 年 5 月 17 日
Hello, I have a file of contours that I want to visualiza in a cross section and another file of points x,y,z. How can I integrate point data into a cross section of those contours. I have tried interp function without success. Any ideas?
THANKS, Jul
0 件のコメント
参考
カテゴリ
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!