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.

MATLAB code error regarding.....

Status
Not open for further replies.

arthics

Newbie level 4
Joined
Mar 2, 2010
Messages
5
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Location
Hydrabad
Activity points
1,313
Hi Experts,

Anyone can correct the following code please.........

My aim is to calculate the value of 'a'. For that we have to first find the value of 'out' (see in the program) then differentiate that with respect to 'a' and equate to '0'. The function dblquad is giving error ........

The equation is given below...

CODING
; I am taking alpha = a , in the program
syms r z

m=0.063;
ep=13.13;
xmin=1;
xmax=L;
ymin=-L/2;
ymax=L/2;

w= cos((pi*z)/L)*exp(-a*sqrt(r.^2+z.^2));
w1 = r*(cos((pi*z)/L)*exp(-a*sqrt(r.^2+z.^2)))^2;
normal = inline(vectorize(w1),'r','z');
potential = w^2*(r/(sqrt(r.^2+z.^2)));
y1= vectorize(r*diff(diff(w,r)));
y2= vectorize(diff(w,r));
y3= vectorize((r)*diff(diff(w,z)));

f1 = inline(y1,'r','z');
f2 = inline(y2,'r','z');
f3 = inline(y3,'r','z');
poten = inline(vectorize(potential),'r','z');
poten



normalize(L) = dblquad(normal ,xmin,xmax,ymin,ymax,[],@quad);


out1 = dblquad(f1,xmin,xmax,ymin,ymax);
out2= dblquad(f2,xmin,xmax,ymin,ymax,[],@quad);
out3 = dblquad(f3,xmin,xmax,ymin,ymax,[],@quad);
out = out1+out2+out3;


Arthi
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top