Help with MESH command

조회 수: 14 (최근 30일)
Janez Novak
Janez Novak 2015년 11월 16일
댓글: Janez Novak 2015년 11월 17일
Im trying to write a space with this equations, but i don´t know how to use mesh properly. Please for little help, im new in matlab.
r=linspace(0,1,30)
theta=linspace(0,2*pi,30)
x=r.*cos(theta)
y=r.*sin(theta)
z=r

채택된 답변

Mike Garrity
Mike Garrity 2015년 11월 16일
Did you mean something like this?
[r,theta] = meshgrid(linspace(0,1,30),linspace(0,2*pi,30));
x = r.*cos(theta);
y = r.*sin(theta);
z = r;
mesh(x,y,z)
  댓글 수: 1
Janez Novak
Janez Novak 2015년 11월 17일
yes this is exactly what i mean thanks a lot

댓글을 달려면 로그인하십시오.

추가 답변 (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