Modify the surf function to plot a surface including the end points of incomplete data matrix?
조회 수: 10 (최근 30일)
이전 댓글 표시
The surf function creates surfaces based on four points. But for the edge of the sample data below, there are only three points available. Is there a better way to plot this surface or is there a clever way to alter the surf function to use three points when that's all that's available?
x = [
23 25 34 36 40;
45 50 56 70 NaN;
44 55 66 NaN NaN;
57 70 NaN NaN NaN;
61 NaN NaN NaN NaN;
];
surf(x)
댓글 수: 0
답변 (1개)
Doug Hull
2012년 10월 10일
You would need to make patches instead of surface if you want triangles. See patch command.
댓글 수: 0
참고 항목
카테고리
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!