Surface bounded by a polygon

2 visualizaciones (últimos 30 días)
Sarah Andrade
Sarah Andrade el 26 de Sept. de 2017
Comentada: Daniel Faller el 7 de Ag. de 2021
I have a polygon and a surface that covers only part of this polygon (this is in 2-D x and y axis). Is there any way to delimit the surface by the polygon? I want only the part that is inside the polygon.
Thanks.

Respuesta aceptada

Chad Greene
Chad Greene el 26 de Sept. de 2017
Without any sample data or illustrations it's mighty difficult to know exactly what you mean, but it sounds like inpolygon is the function you're looking for. Just feed it the x,y locations of your surface (generated by meshgrid) and it will tell you which corresponding surface locations are inside the polygon.
  4 comentarios
Sarah Andrade
Sarah Andrade el 27 de Sept. de 2017
Thank you so much, Chad!!
Daniel Faller
Daniel Faller el 7 de Ag. de 2021
Thank very much, Chad! I really had some use for your answer!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by