problem using a double integral function: integral2
Afficher commentaires plus anciens
I can't calculate the integral using the function integral2, matlab gives the following error
>> Untitled
Undefined function 'mpower' for input arguments of type 'function_handle'.
Error in @(x,y)Dx*(dwidx2)^2+Dy*(dwidy2)^2+Dxy*dwidx2*dwidy2+4*G*dwidydx2
Error in integral2Calc>integral2t/tensor (line 229)
Z = FUN(X,Y); NFE = NFE + 1;
Error in integral2Calc>integral2t (line 56)
[Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Error in integral2Calc (line 10)
[q,errbnd] = integral2t(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 107)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in Untitled (line 39)
integral2(func,0,1.436,0,1.981)
my program is as follows:
clear all
a=1.436;
b=1.981;
Nx=0.947;
Ny=0.639;
Nxy=0.799;
Dx=1;
Dy=1;
Dxy=1;
G=12*10^9;
M = eye(9,2);
A = eye(9,1);
%matriz que define os pontos
i=1;
for m=1:3
for n=1:3
M(i,:)= [m n];
i=i+1;
end
end
for i=1:9
m=M(i,1);
n=M(i,2);
ym=(4*m+1)*(pi/4);
yn=(4*n+1)*(pi/4);
Xm=@(x)(cosh(((ym/b)^2)*x)-cos((ym/b)^2*x))-((cosh((ym^2)/b)-cos((ym^2)/b))/((sinh((ym^2)/b)-sin((ym^2)/b))))*(sinh((ym/b)^2*x)-sin((ym/b)^2*x));
Yn=@(y) cosh(((yn/a)^2)*y)+cos((yn/a)^2*y)-((cosh((yn^2)/a)+cos((yn^2)/a))/(sinh((yn^2)/a)+sin((yn^2)/a)))*(sinh((yn/a)^2*y)+sin((yn/a)^2*y));
wi=@(x,y)Xm*Yn;
dwidx2=@(x,y)diff(wi,x,2);
dwidy2=@(x,y)diff(wi,y,2);
dwidydx2=@(x,y)diff(diff(wi,x),y);
func=@(x,y)Dx*(dwidx2)^2+Dy*(dwidy2)^2+Dxy*dwidx2*dwidy2+4*G*dwidydx2;
integral2(func,0,1.436,0,1.981)
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur External Language Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!