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!