Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Have you ever needed to draw a bunch of rectangles on a figure? Did your code look like this:
for i=1:numberOfRectangles
rectangle('Position',blah blah blah...);
end
This code can become quite slow when the number of rectangles increases significantly. I wrote the RECTANGLES function to solve this problem by plotting multiple rectangles as a single patch.
The only required input is an Mx4 array of rectangle vectors [x,y,w,h] corresponding to M rectangles.
>> rectangles(pos);
See the function header for additional details and a list of optional parameters. Run the demo script if you want to view sample results fast without writing any code yourself.
Citar como
Matthew Eicholtz (2026). rectangles (https://la.mathworks.com/matlabcentral/fileexchange/59243-rectangles), MATLAB Central File Exchange. Recuperado .
Agradecimientos
Inspiración para: rectangles
Información general
- Versión 1.1.0.0 (3,33 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
