How can I plot a horizontal line for a polar plot?
이전 댓글 표시
I have a polar plot of two lines with an equation to get the percent error between them. How do I plot a horzontal line where the percent error is at 5%?
Code is below.
Thanks in advance.
alpha = 0:0.01:(1/2) * pi;
y = sin(alpha);
polarplot(alpha,y) %first plot
pause(1)
hold on
polarplot(y.*(alpha)==alpha) %second plot
pError = 100*(alpha-sin(alpha))./sin(alpha); %percent difference
disp(pError);
pause(1)
polarplot(pError .* .05) %horizontal line at 5% error
hold off
댓글 수: 2
Star Strider
2020년 4월 29일
It looks as though you already did that:
polarplot(pError .* .05) %horizontal line at 5% error
What do you want it to be?
Christian Bellew
2020년 4월 29일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!