Suggestion for MATLAB
Hai Everybody,
I am having problem for solving the following equation in MATLAB. The code is given bellow. If I am giving some value for α it is working . But my aim is to find the value of α . If I am taking α as it is upto inline function it is working perfectly. The integration is giving problem. If you know please help me.
code :
m=0.063;
syms r z a
w= cos((pi*z)/L)*exp(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');
xmin=1;
xmax=L;
ymin=-L/2;
ymax=L/2;
out1(L) = dblquad(f1,xmin,xmax,ymin,ymax);
out2(L) = dblquad(f2,xmin,xmax,ymin,ymax,[],@quad);
out3(L) = dblquad(f3,xmin,xmax,ymin,ymax,[],@quad);
out = out1 + out2 + out3;
Thank you
Swamy