matlab将多个圆绘制为一个直线对象

收录时间:2020-07-29
资源分类:Matlab 工具:MATLAB 7.14 (R2012a)

matlab将多个圆绘制为一个直线对象

Draw multiple circles as a single line object

Plot multiple circles as a single line object...very fast, very efficient!

 

SYNTAX:

circles(radii,centers) plots circles of radius values specified by RADII, at centers specified by CENTERS.

 

Will accept as inputs any valid properties accepted by PLOT, and return the handle to the line object as well as a vector of plotted xs and ys (delimeted by NaNs for individual circles).

 

EXAMPLE:

 

r = rand(20,1)*100;

c = rand(20,2)*300;

[h,xs,ys] = circles(r,c,...

          'color','r','linewidth',2);

axis equal

 

Note that if r is a scalar and c is a single x-y- coordinate, this works just like other approaches to circle plotting. But with multiple radii and centers, using CIRCLES provide FAST, memory-efficient plotting (with the trade-off that only a single handle is returned).

文件下载列表
circles.zip (2.47KB)  
附件内容(只显示2中的1个)
circles.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备18060134号-2