フィルターのクリア

double integral when using syms

6 ビュー (過去 30 日間)
Sandeep
Sandeep 2012 年 11 月 25 日
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?

採用された回答

Walter Roberson
Walter Roberson 2012 年 11 月 25 日
Use int() for symbolic integration.
  1 件のコメント
Sandeep
Sandeep 2012 年 11 月 25 日
Thanks..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by