need help in matlab code explanation.....
below are the code that racking my brain....
function Z = linear_AF(N,d,w,angles_0,E_pattern)
k0 = 2*pi;
m = linspace(0,N-1,N);
theta = linspace(-pi/2,pi/2,181);
AF = E_pattern .* sum(diag(w)*exp(i*(k0*d*m'*sin(theta))));
AF = 20*log10(abs(AF)./max(abs(AF)));
Z = AF(91+angles_0(2:length(angles_0)));
I want to know what exactly mean by last three lines?? anyone can help to explain to me....matlab is reli killing me.....thanks a lot...
function Z = linear_AF(N,d,w,angles_0,E_pattern)
k0 = 2*pi;
m = linspace(0,N-1,N);
theta = linspace(-pi/2,pi/2,181);
AF = E_pattern .* sum(diag(w)*exp(i*(k0*d*m'*sin(theta))));
AF = 20*log10(abs(AF)./max(abs(AF)));
Z = AF(91+angles_0(2:length(angles_0)));
I want to know what exactly mean by last three lines?? anyone can help to explain to me....matlab is reli killing me.....thanks a lot...
0