Ana-Maria
Member level 1
Hi all,
I must calculate this integral with matlab
and the code I wrote doesn't help. Please can anyone help me and tell where is the mistake?
NES=200;
w=2*pi*10^9;
for m=1:NES
teta(m)=-pi+2*(m-1)*pi/(NES-1);
end;
grondre=1/(2*pi)*trapz(teta,rectangular(teta,w).*cos(-k*teta));
grondim=1/(2*pi)*trapz(teta,rectangular(teta,w).*sin(-k*teta));
grondx=grondre+i*grondim;
Thanks!
I must calculate this integral with matlab
and the code I wrote doesn't help. Please can anyone help me and tell where is the mistake?
NES=200;
w=2*pi*10^9;
for m=1:NES
teta(m)=-pi+2*(m-1)*pi/(NES-1);
end;
grondre=1/(2*pi)*trapz(teta,rectangular(teta,w).*cos(-k*teta));
grondim=1/(2*pi)*trapz(teta,rectangular(teta,w).*sin(-k*teta));
grondx=grondre+i*grondim;
Thanks!