double integral when using syms
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
syms x y a
w(1)=(x-5)*(y-5)*(x-2.5)*(y-2.5)*(4/625);
w(2)=x*(x-5)*(y-2.5)*(y-5)*(-8/625);
w(3)=x*(x-2.5)*(y-2.5)*(y-5)*(4/625);
w(4)=(x-2.5)*(x-5)*y*(y-5)*(-8/625);
w(5)=x*(x-5)*y*(y-5)*(16/625);
w(6)=x*(x-2.5)*y*(y-5)*(-8/625);
w(7)=(x-2.5)*(x-5)*(y-2.5)*y*(4/625);
w(8)=x*(x-5)*(y-2.5)*y*(-8/625);
w(9)=x*(x-2.5)*(y-2.5)*y*(4/625);
for i=1:2
for j=1:2
m=diff(w(i),x);
n=diff(w(j),x);
o=diff(w(i),y);
p=diff(w(j),y);
a(x,y)=m.*n+o.*p;
fun=@(x,y)a(x,y)
k(i,j)=integral2(fun,0,5,0,5);
end
end
k
This is the code I am trying to run and I am getting an error "Input function must return 'double' or 'single' values. Found 'sym'." .. Any idea if this can be fixed? If not.. how do I evaluate the double integral?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!