How to plot a surf-plot without data extrapoation?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Philippe Corner
le 3 Déc 2020
Modifié(e) : Walter Roberson
le 8 Août 2021
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 commentaires
Réponse acceptée
KSSV
le 4 Déc 2020
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!