Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Matlab 中,我有一个零布尔矩阵和一个点列表。
例如:
matrix = zeros(x, y); points = [x1 y1; x2 y2; x3 y3; x4 y4];
如何设置由这些点形成的多边形包围的矩阵中的所有位?
我知道填充功能,但这似乎只是绘制形状而不是填充矩阵。
我建议使用inpolygon或poly2mask matlab 函数。