Defining and plotting a function using symsum
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello
I am trying to plot the array factor for a uniform linear antenna array using this code:
syms k
psi = -pi: .05: pi;
AF = symsum(exp(1i*(k-1).*psi), k, 1, 10)
AF_dB = 10.*log10(AF);
figure(1)
plot(psi, AF_dB)
I can tell that something is wrong with the way I am defining the summation for AF because when k is 1, AF is evaluated to be 0 when it should be 1.
I am trying to figure out how to define a function, in this case AF, as a summation so that I can define more complicated array factors and do things like determine side lobe level by using findpeaks, etc. Is there a better way to do that than what I have tried to implement here?
Thank you
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!