How do I plot a contour map in Matlab?

조회 수: 13 (최근 30일)
cstibbards
cstibbards 2018년 9월 10일
댓글: cstibbards 2018년 9월 10일
>> x=-6:0.001:6; >> y=-6:0.001:6; >> [X,Y]=meshgrid(x,y); >> phi=x.*y-y; >> contour(x,y,phi) Error using contour (line 48) Z must be at least a 2x2 matrix.

채택된 답변

madhan ravi
madhan ravi 2018년 9월 10일
편집: madhan ravi 2018년 9월 10일
EDITED
x=linspace(-6,6,1000);
y=x;
[X,Y]=meshgrid(x,y)
phi=X.*Y-Y
contour(X,Y,phi)
  댓글 수: 5
madhan ravi
madhan ravi 2018년 9월 10일
did it work @cstibbards?
cstibbards
cstibbards 2018년 9월 10일
Not yet, but I think its an issue with my computer running Matlab, not the code. Thanks.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by