我需要使用integral2()
函数,语法为:q = integral2(fun, xmin , xmax, ymin , ymax)
。
我尝试过这些命令:
Alphai(: , 1) = {@(x,y) Alpha(1,1)+Alpha(2,1)*x+Alpha(3,1)*y};
Alphai(: , 2) = {@(x,y) Alpha(1,2)+Alpha(2,2)*x+Alpha(3,2)*y};
Alphai(: , 3) = {@(x,y) Alpha(1,3)+Alpha(2,3)*x+Alpha(3,3)*y};
for ind = 1:3
temp0 = integral2(Alphai(: , ind), xmin , xmax , ymin , ymax);
end
(已定义xmin
,xmax
,ymin
,ymax
)
但我收到了一个错误:
First input argument must be a function handle
有人可以帮助并解释我的错误吗?
答案 0 :(得分:0)
试试这个:
for ind = 1:3
temp0 = integral2(Alphai{: , ind}, xmin , xmax , ymin , ymax);
end