polar plot being reflected

조회 수: 5 (최근 30일)
SARVESH AGRAWAL
SARVESH AGRAWAL 2017년 9월 16일
댓글: Abida Parveen 2021년 4월 2일
I have been trying to plot a polar plot. However, MATLAB reflects the smaller loop. That loop is supposed to be on the left side of 0. Please help!
My code:
function micplothyp
theta=0:0.1:((2*pi)+1);
R= 0.25 + (0.75 * cos(theta));;
polarplot(theta,R,'r');
ax=gca;
ax.ThetaColor= 'k';
ax.ThetaAxis.Color='k';
ax.RTick= [0 0.2 0.4 0.6 0.8 1];
ax.RAxisLocation=30;
ax.Box='on';
ax.GridLineStyle='-.';
title('Response of a hyper-cardioid microphone');
end

채택된 답변

Star Strider
Star Strider 2017년 9월 16일
Plot the absolute value of ‘R’:
polarplot(theta,abs(R),'r');
That should produce the plot you want.
  댓글 수: 2
SARVESH AGRAWAL
SARVESH AGRAWAL 2017년 9월 16일
Thank you sir!
Star Strider
Star Strider 2017년 9월 16일
As always, my pleasure!

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

추가 답변 (1개)

Abida Parveen
Abida Parveen 2021년 4월 2일
most microphones designed for use on a stage are directional microphones, which are specifically built to enhance the signals recived from the singer in the front of the microphone while suppressing the audience noise from behind the microphones.
the gain of such a microphone varies as a function of angle according to the eqution.
gain=2g(1+cosθ)
where g is a constant associated with a particular microphone, and θ is the angle from the axis of the microphone to the sound source. assume that g is 0.5 for a particular microphone, and make a polar plot the gain of the microphone as a function of the direction of the sound source.
  댓글 수: 2
Steven Lord
Steven Lord 2021년 4월 2일
This sounds like a homework assignment. If it is, please post this as a separate question. When you post that separate question, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Abida Parveen
Abida Parveen 2021년 4월 2일
yes Sir ,
it's my assingnment question. i didn't understad.
Thank you Sir for your suggestion.
this is my code
x=linspace(0,90,180);
g=0.5;
y=2*g(1+cos(x));
plot(x,y,'b-');
title('polar plot')
xlabel('x');
ylabel('y');
grid on
i am new user of MATLAB.

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

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by