plot gridded data only inside shapefile

I import a shapefile and have gridded data that exceeds the borders of the shapefile. How can i only plot the data within the shapefile?
shp = shaperead("Germany.shp");
data.Lat = linspace(0,90,200);
data.Lon = linspace(0,90,200);
data.Height = rand(1,200);

回答 (1 件)

KSSV
KSSV 2022 年 5 月 17 日

0 投票

Read about inpolygon.

製品

リリース

R2021b

質問済み:

2022 年 5 月 17 日

回答済み:

2022 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by