rectangles

버전 1.1.0.0 (3.33 KB) 작성자: Matthew Eicholtz
Draw multiple rectangles fast.
다운로드 수: 115
업데이트 날짜: 2016/9/22

라이선스 보기

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.

인용 양식

Matthew Eicholtz (2026). rectangles (https://kr.mathworks.com/matlabcentral/fileexchange/59243-rectangles), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Surface and Mesh Plots에 대해 자세히 알아보기
도움

도움 준 파일: rectangles

버전 게시됨 릴리스 정보
1.1.0.0

Added str2rgb as helper function.

1.0.0.0

Updated summary.
Updated thumbnail.