How can I plot circles of different diameters within a square?
조회 수: 1 (최근 30일)
이전 댓글 표시
I need help to create code which will generate circles of different diameters within a square geometry. The circles cannot overlap. I am an amateur at using Matlab and any ideas will be greatly appreciated.
댓글 수: 0
채택된 답변
Kevin Claytor
2012년 7월 17일
This file may do what you want, or similar enough to it; http://www.mathworks.com/matlabcentral/fileexchange/33213-growbubbles-maximum-radius-packing
댓글 수: 3
Kevin Claytor
2012년 7월 17일
This error often occurs when functions are used as scripts. You'll want to save the function as a .m file with the same name (growbubbles.m), then you call it from the command window / your scripts with;
ptrads = growbubbles(ptsIn)
That is, you don't need the 'function' keyword when calling functions from the command window / scripts. It is used to declare a .m file as a function rather than a script.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!