How to initialize polyshape array?

How to initialize polyshape array like "zeros(N,N)"?
I use polyshape in my discrete simulation,
and using "for statement" to get polyshape object for each sampling.
Therefore, I need to initialize N by k array for N elements and k sampling times.
Please let me know.
Thanks

 采纳的回答

P = repmat(polyshape, 1, 5);
for k = 1:5
P(k) = nsidedpoly(2+k, 'Center', [2*k, 0]);
end
plot(P)
axis equal

2 个评论

Thanks for the reply.
It worked fine.
Thank you very much for your help.
@裕紀 木村 You should accept-click the answer to certify that it resolved your question.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Elementary Polygons 的更多信息

产品

版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by