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.

Balanis Graphs in Matlab

Status
Not open for further replies.

ahsaan

Member level 5
Member level 5
Joined
Apr 25, 2009
Messages
81
Helped
13
Reputation
26
Reaction score
11
Trophy points
1,288
Location
Pakistan
Activity points
1,681
graphs in mat lab

Hi/AA

does any one know or has the implementation of balanis
book equation no 14.92 in matlab? It should plot the graph
given in the book. Or any idea about the codes of all the graphs in balanis book
specially CHP 14 eq14.92? I have done myself but getting some error.
the file is uploaded here
Thank you
 

book matlab graph

Hi, i gave a quick look to Balanis and in your matlab files there are few errors.
First of all I woul suggest you to avoid to use i as counter for the for cycle coz i is also sqrt(-1). I usually use ii instead of just i. Also sum is a matlab function so u'd better use another name for that variable.

Anyway, going back to ur code the mistakes I spotted are:

eps = 2.2; i think u need to multiply this for eps_0 (8.85e-12 or something similar)

z = (0:0.2:1)'; %Bessel Function (first kind order zero is reqd)
J = besselj(1,z);
This doesn't make sense coz u have to use as argument for the Bessell function what u multiply for it in the next lines of code:
c = 2.*J.*(Y.*2*pi.*sin(i)./lam); - wrong
c = 2.*J(1,(Y.*2*pi.*sin(i)./lam); - probably correct
u dont need z at all.

for i=0:pi would evaluate i=0,1,2 and 3 but 4 points might be not enough for a numerical integration. use something like for ii=0:dθ:pi with dθ=pi/50.

dont forget to multiply the integral argument for dθ, in your case this would mean:
f = (a.*b.*(c+d+e))*dθ;
or u can actually do this in the end after the for cycle: sum=sum*dθ;

cheers
 

    ahsaan

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top