How to plot multi polar graph on the x-y coordinate by random the center point?

4 ビュー (過去 30 日間)
Minthorn Ph'w
Minthorn Ph'w 2018 年 5 月 14 日
コメント済み: Minthorn Ph'w 2018 年 5 月 15 日
As the picture below I would like to draw the polar graph(right pic) on the left graph. right now, I can draw only one on the center. However, I also want to draw the polar graph on the other points which show as a small square. Please help to suggest, how to move the center.

採用された回答

KSSV
KSSV 2018 年 5 月 15 日
Convert your polar coordinates to Cartesian using pol2cart, and then you can plot everything in Cartesian coordinates. Check the below pseudo code.
theta = 0:0.01:2*pi;
rho = sin(theta).*cos(theta);
% convert polar coordinates to cartesian
[x,y] = pol2cart(theta,rho) ;
N = 10 ;
cx = (5-1)*rand(1,N)+5 ;
cy = (5-1)*rand(1,N)+5 ;
figure
hold on
for i = 1:N
plot(cx(i),cy(i),'sb')
plot(cx(i)+x,cy(i)+y,'r')
end
  2 件のコメント
Minthorn Ph'w
Minthorn Ph'w 2018 年 5 月 15 日
wow! really thanks :)
Minthorn Ph'w
Minthorn Ph'w 2018 年 5 月 15 日
I forgot to convert polar to cartesian

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by