d*********a 发帖数: 255 | 1 【 以下文字转载自 Computation 讨论区 】
发信人: dragoninsea (鲜花送给谁?), 信区: Computation
标 题: 如何用matlab计算下面特殊的二重积分
发信站: BBS 未名空间站 (Wed Oct 1 23:18:21 2008)
(1) matlab示性函数是如何表示的?
function y=indab(a,b,u)
y=and(a<=u,u<=b);
这样表示 I (a<=u<=b) 对吗 有没有简单的方法?
(2) p(x)=I(1/2<=2x<=1)-I(0<=2x<1/2); 其中I是示性函数(0 and 1)
如果p(x)是一般的连续函数,用下面的命令很容易得到结果。但现在p(x)是示性函数,
显示出错,如何解决?
syms x y;
int(int(sin(x)*p(x)*p(y),x,0,1),y,0,1))
??? Function 'le' is not defined for values of class 'sym'. |
|