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!