필터 지우기
필터 지우기

3d surfaces in matlab

조회 수: 1 (최근 30일)
Cyrus
Cyrus 2013년 7월 31일
Hi everybody,
I'm relatively new to plotting 3d surfaces and am looking for help. I have some sets of data to work with (say, 3 columns), and was wondering if someone can show me a basic example of how to plot a 3d surface with a x,y,z axis.

채택된 답변

Marc
Marc 2013년 7월 31일
doc surf doc mesh
k = 5;
n = 2^k-1;
[x,y,z] = sphere(n);
c = hadamard(2^k);
surf(x,y,z,c);
colormap([1 1 0; 0 1 1])
axis equal
figure;
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(Z);
Straight from the documentation. You can also look for "GEOM3D" in the file exchange. This is a nice toolbox for creating 3d images. The code is there for you to dig into.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by