File Exchange Pick of the Week

Our best user submissions

Drawing a Circle

You may have noticed some recent changes in the format of this blog. Here’s what to expect on a regular basis – two topics per week.
  • On Tuesdays Doug will provide MATLAB tutorials.
  • On Fridays guest bloggers Jiro, Brett and Bob will highlight File Exchange submissions.
In上周的一周选秀, I talked about fitting a circle to a collection of points. With a small example, I showed how Izhak Bucher'sCircFitmakes short work of that task. But to visualize the circle I fit through my faked data, I used MATLAB's rectangle command! If that seems odd to you, then this week's pick is for you: Zhenhai Wang'sDraw a Circlesubmission lets you visualize your circle with (to me) a much more natural syntax, specifying the coordinates of the center, the radius of the circle, and the number of points to plot. Optionally, the file also lets you specify the style parameters for the plotted curve. For instance:
r = 10;中心= [5,8];圆(中心,R,1000,'b-'); hold情节(中心(1),中心(2),,'g.')
好的,所以您可能会认为使用此语法绘制一个圆圈并不是您尝试过的最困难的事情。尽管如此,近24,000人已经下载了Zhenhai的文件!这表明它在很容易的情况下也不容易。或者至少,成为他人工作的受益者非常方便。和“画一个圆圈”也非常受审查。从42次评论中,它平均有4.29星(在5个)恒星中。这意味着很多人对Zhenhai的努力感到满意。实际上,提交几年后,“绘制圆圈”每月继续获得数百个下载(在过去30天内有661个)。此外,另外两个文件引用了本周的选择作为灵感。做得好,Zhenhai! Got a favorite plotting routine that makes your life easier? Let us know about it!

Published with MATLAB® 7.6

|
  • print
  • send email

注释

To leave a comment, please click这里to sign in to your MathWorks Account or create a new one.