How to initialize polyshape array?
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 5 Dez. 2021
P = repmat(polyshape, 1, 5);
for k = 1:5
P(k) = nsidedpoly(2+k, 'Center', [2*k, 0]);
end
plot(P)
axis equal
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!