Plot a circular histogram for table Data

조회 수: 4 (최근 30일)
Gavin Seddon
Gavin Seddon 2022년 5월 31일
댓글: Star Strider 2022년 5월 31일
Hello
I have a table of angles v deviations
how do I plot a circhist of the table?
G.

채택된 답변

Star Strider
Star Strider 2022년 5월 31일
I am not certain what the data are, how how the angles and deviations relate. Perhaps either polarplot or polarhistogram will do what you want.
Plotting a stairs.function as a polar plot is also an option —
ang = linspace(0, 2*pi, 50);
dev = rand(size(ang));
r = 1;
th = linspace(0, 2*pi, 180);
xc = r*cos(th);
yc = r*sin(th);
rx = xc(1:15:end);
ry = yc(1:15:end);
[xs,ys] = stairs(ang,dev);
xs = [xs; xs(1:2)];
ys = [ys; ys(1:2)];
[xp,yp] = pol2cart(xs,ys);
figure
plot(xp, yp)
hold on
plot(xc, yc, '-k')
zv = zeros(size(rx));
plot([zv;rx], [zv;ry], '--k')
hold off
axis('equal')
Ax = gca;
Ax.XColor = 'none';
Ax.YColor = 'none';
.
  댓글 수: 2
Gavin Seddon
Gavin Seddon 2022년 5월 31일
Thanks, would this be polarhistogram rot.TAB
The work was calculating the table.
Thanks StSt.
G.
Star Strider
Star Strider 2022년 5월 31일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by