Mesh Plot
조회 수: 13 (최근 30일)
이전 댓글 표시
I am attempting to plot the equation X^2 + 4*Y^2 < 1, using the mesh function. I currently have the code
[X,Y] = meshgrid(-1:.25:1);
Z = ((X.^2 + 4 * Y.^2) );
mesh(X,Y,Z)
However, this does not follow the requirement of Z < 1. How would I accomplish this?
댓글 수: 0
답변 (1개)
the cyclist
2011년 8월 2일
I don't understand why you expect Z to be less than 1, since your definition of Z clearly has a maximum of 5.
However if you only want to plot values of Z that are less than 1, then you could substitute "NaN" where Z>=1, like this:
Z(Z>1) = NaN
and then do your mesh plot.
댓글 수: 8
the cyclist
2011년 8월 2일
Sorry! I made a typo of "finger mesh" instead of "finer mesh". I corrected it.
Sean de Wolski
2011년 8월 2일
http://www.mathworks.com/matlabcentral/fileexchange/16728-fingerprint-application
finger meshing!
참고 항목
카테고리
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!