How to plot a circle of some radius on a polar plot ?

79 次查看(过去 30 天)
eg. i want a small circle with origin as center of some radius...ON the POLAR plot

采纳的回答

Walter Roberson
Walter Roberson 2017-3-18
th = linspace(0,2*pi,50);
r = 10;
polar(th,r+zeros(size(th)))
  2 个评论
Ron Beck
Ron Beck 2018-3-2
编辑:Ron Beck 2018-3-2
I have used this script and it works (changed polar to polarPlot) but can't run it as a function. Any ideas?

请先登录,再进行评论。

更多回答(1 个)

Gabriel Malagon Carvajal
When is not center in the origen?
  1 个评论
Walter Roberson
Walter Roberson 2017-9-9
%need centres for demo purposes
xc = randn() * 5; yc = randn() * 5;
%the work
th = linspace(0,2*pi,50);
r = 10;
[x,y] = pol2cart(th,r);
[th1, r1] = cart2pol( x+xc, y+yc );
polar(th1, r1);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by