How do I get a outer loop in a polar plot in MATLAB
5 views (last 30 days)
Show older comments
To display the multiple microphone directive pattern, I wrote a simple MATLAB program.
% Super-cardiod = 0.57
% Hyper-Cardiod = 0.33
A_sen = 20.0; % sensitivity
c = 343; % speed of sound 343 m/s
Beta_1 = 0.33; % beta value for the shape of the directivity pattern
Beta_2 = 0.57; % beta value for the shape of the directivity pattern
d = 0.09; % distance between two microphones
Ang_freq = 90; % Angular frequency of sound
theta = linspace(-2*pi,2*pi); % Angular ref to microphone
U_total_1 = (A_sen *(Ang_freq*d)/c)*(Beta_1+cos(theta));
U_total_2 = (A_sen *(Ang_freq*d)/c)*(Beta_2+cos(theta));
subplot(2,1,1),polar(theta,U_total_1)
subplot(2,1,2),polar(theta,U_total_2)
The MATLAB program works to display the directivity pattern as below,

However, I'd like the inner loop to be an outer loop as shown in the link below.
I suppose this is due to the axes limits. But I'm not sure. How do I get the inner loop to show as an outer loop. Thank you..
Note: I am using R2014b. Therefore I don't have the polarplot function. So I will have to stick to the polar function in MATLAB.
4 Comments
Accepted Answer
David Goodmanson
on 8 Nov 2017
Hi Union Olive,
If you replace
U_total_1 = (A_sen *(Ang_freq*d)/c)*(Beta_1+cos(theta));
with
U_total_1 = abs(A_sen *(Ang_freq*d)/c)*(Beta_1+cos(theta)));
and similarly with U_total_2 it should work.
4 Comments
Walter Roberson
on 8 Nov 2017
The picture-Frame button between the link icon and the paper clip is to insert images. Just make sure you have an empty line before and after the coding of the link. The system uses <<URL>> as the indication to put the image in-line.
More Answers (0)
See Also
Categories
Find more on Get Started with Phased Array System Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!