Radiation Pattern - problems in horizontal scaling
Mostrar comentarios más antiguos
Hi there. I'm plotting two radiation patterns to compare them, but according to the solution I was given, they don't seem to scale properly.

The one at the top is the solution, the one at the bottom is mine.
This is my code:
%%Problem 9
N = 10; delta = pi/N;
f = @(x) ((N*sin(delta/2))/(sin(N*(delta/2))))*(sin(N.*x./2)./(N.*sin(x./2)));
theta = linspace(-2,2,300);
% a = 2*pi/3; phi = a*(cos(0.95*theta)-1)-delta;
a = 2*pi/3; phi = a*(cos(theta)-1)-delta;
F = f(phi); F = 20*log10(F); F = real(F);
F(F<-35) = -55;
figure(),plot(1.1*theta,F,'r','LineWidth',2);
hold on
% a = 20*pi/30; phi = a*(cos(theta)-1)-delta;
a = 23*pi/30; phi = a*(cos(theta)-1)-delta;
F = f(phi); F = 20*log10(F); F = real(F);
F(F<-35) = -45;
plot(theta,F,'b','LineWidth',2); hold off
axis([-1.5 1.5 -60 0])
xlabel('Theta'); ylabel('Normalized AF(dB)');
legend('Ordinary','Hansen Woodyard');
What am I doing wrong? How can I scale the graph horizontally, and "flatten" the top? Is there any info I've left out that could help?
Thank you.
Respuestas (0)
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!