How to plot a surf-plot without data extrapoation?
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to plot the same surf plot but without extrapolating on areas where are not scatter data.
The following script generates the attached figure.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/443053/image.png)
The final plot should interpolate below the black line (only where data exists) like:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/443158/image.png)
댓글 수: 3
채택된 답변
KSSV
2020년 12월 4일
You have the black line in hand.. make a closed polygon out of it and get the indices of the points lying inside and outside using inpolygon. From the data matrix, make the points lying outside NaN.
댓글 수: 6
추가 답변 (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!