Waxterz
- 4
- 0
Hi,
I need to plot the last function of this:
But I don't know how to generate the sum. I know the for loop is totally wrong, but I can't go any further. This is what I have:
Can someone fix the summation loop part for me?
Thanks in advance
I need to plot the last function of this:
But I don't know how to generate the sum. I know the for loop is totally wrong, but I can't go any further. This is what I have:
K = 8;
L = 950*10^-9;
g = 2*pi/L;
v0 = 30;
v = -90:10:90;
d = 950*10^-9;
for i = 1:8;
S = exp(1i*g*(K-i)*d*(sind(v)-sind(v0)));
end
A = 20*log(abs(S)/8);
A
Can someone fix the summation loop part for me?
Thanks in advance