Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

urgent help needed for this Matlab inetgration!!! 40 pts

Status
Not open for further replies.

Ana-Maria

Member level 1
Joined
Apr 22, 2007
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,504
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!
 

you are missing information:

what is the 'rectangular' function? If you are making a window, you won't be able to make it 'w' long (w is 1e9 in length!)

What is the name of the function you are integrating? Could you explicitly write out what G(theta; f(w)) is?

thanks
 

Hi,
G(teta,w) = rectangular, is the first part of the integration (the second part is exp(j*kt*eta))
and the code for G(teta,w)

function [G]=rectangular(teta,w);
c=3*10^8;
G0=1;
f=2*10^9;
h=[c/(4*f),c/(2*f),3*c/f,c/f];
ordin=2;
x=w*h(ordin)/(2*c)*sin(teta);
for k=1:length(x)
if x(k)==0
G(k)=G0;
else
G(k)=G0*sin(x(k))/x(k);
end
end


for the moment f(w)=w and w=2*10^9
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top