Defining and plotting a function using symsum
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!