matlab int积分常数,matlab int 积分

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

>> help int

--- help for sym/int.m ---

INT    Integrate.

INT(S) is the indefinite integral of S with respect to its symbolic

variable as defined by FINDSYM. S is a SYM (matrix or scalar).

If S is a constant, the integral is with respect to 'x'.

INT(S,v) is the indefinite integral of S with respect to v. v is a

scalar SYM.

INT(S,a,b) is the definite integral of S with respect to its

symbolic variable from a to b. a and b are each double or

symbolic scalars.

INT(S,v,a,b) is the definite integral of S with respect to v

from a to b.

Examples:

syms x x1 alpha u t;

A = [cos(x*t),sin(x*t);-sin(x*t),cos(x*t)];

int(1/(1+x^2))           returns     atan(x)

int(sin(alpha*u),alpha)  returns     -cos(alpha*u)/u

int(besselj(1,x),x)      returns     -besselj(0,x)

int(x1*log(1+x1),0,1)    returns      1/4

int(4*x*t,x,2,sin(t))    returns      2*sin(t)^2*t-8*t

int([exp(t),exp(alpha*t)])  returns  [exp(t), 1/alpha*exp(alpha*t)]

int(A,t)                 returns      [sin(x*t)/x, -cos(x*t)/x]

[cos(x*t)/x,  sin(x*t)/x]

There is more than one int available.  See also

help char/int.m

int函数用以演算一函数的积分项, 这个函数要找出一符号式 F 使得diff(F)=f。如果

积分式的解析式 (analytical form, closed form) 不存在的话或是MATLAB无法找到,

则 int 传回原输入的符号式。相关的函数语法有下列 4个:

int(f) 传回f对预设独立变数的积分值

int(f,'t') 传回f对独立变数t的积分值

int(f,a,b) 传回f对预设独立变数的积分值,积分区间为[a,b],a和b为数值式

int(f,'t',a,b) 传回f对独立变数t的积分值,积分区间为[a,b],a和b为数值式

int(f,'m','n') 传回f对预设变数的积分值,积分区间为[m,n],m和n为符号式

我们示范几个例子:

>>S1 = '6*x^3-4*x^2+b*x-5';

>>S2 = 'sin(a)';

>>S3 = 'sqrt(x)';

>>int(S1)

ans=

3/2*x^4-4/3*x^3+1/2*b*x^2-5*x

>>int(S2)

ans=

-cos(a)

>>int(S3)

ans=

2/3*x^(3/2)

>>int(S3,'a','b')

ans=

2/3*b^(3/2)- 2/3*a^(3/2)

>>int(S3,0.5,0.6)

ans=

2/25*15^(1/2)-1/6*2^(1/2)

>>numeric(int(S3,0.5,0.6)) % 使用numeric函数可以计算积分的数值

ans=

0.0741

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值