How to plot a cross-section of a surface plot
44 次查看(过去 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!