Defining coordinates and points in a 3D plot

조회 수: 14 (최근 30일)
Breanna Elliott
Breanna Elliott 2018년 9월 2일
댓글: Walter Roberson 2018년 11월 29일
How do I define the length of x (0 to 1m) and y (0 to .5m) with a grid of 101 by 51 points? This is a 3D plot
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 11월 29일
Please do not close questions that have an Answer.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 2일
xv = linspace(0, 1, 101);
yv = linspace(0, 0.5, 51);
[X, Y] = ndgrid(xv, yv);
Z = sqrt(sin(X)) .* cos(Y-X).^2;
surf(X, Y, Z, 'edgecolor', 'none');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by