声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1230|回复: 8

[编程技巧] 包含参数的函数积分问题

[复制链接]
发表于 2014-3-7 10:50 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
本帖最后由 牛小贱 于 2014-3-7 11:02 编辑

程序:
  1. clear all;
  2. syms x t
  3. y=real(exp(-x.^2).*conj(exp(-(x+t).^2).*exp(-i.*2.*pi.*(192.31.*t+10.*x))));
复制代码
>>  y=subs(y,t,-5);
int=int(y,x,-inf,inf)
Warning: Explicit integral could not be found.  

int =

int(exp(2*pi*(10*conj(x) - 19231/20)*i)/(2*exp((conj(x) - 5)^2)*exp(x^2)) + (1/exp(2*pi*(10*x - 19231/20)*i))/(2*exp((x - 5)^2)*exp(conj(x)^2)), x = -Inf..Inf)
积分为什么没结果?

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

 楼主| 发表于 2014-3-7 10:51 | 显示全部楼层
求指教啊。。
发表于 2014-3-7 10:52 | 显示全部楼层
看提示:Explicit integral could not be found

函数积分无解析解

评分

1

查看全部评分

 楼主| 发表于 2014-3-7 10:59 | 显示全部楼层
犟牛 发表于 2014-3-7 10:52
看提示:Explicit integral could not be found

函数积分无解析解

对函数积分完以后得到的不应该是对应的数值吗 为什么说是无解析解呢。
发表于 2014-3-7 11:19 | 显示全部楼层
请看清楚,你用的是符号积分
 楼主| 发表于 2014-3-7 11:37 | 显示全部楼层

包含复数的数值积分。。

想求这个积分:  

                               
登录/注册后可看大图


t是参数,取对应一组值。
程序:
clear all;
syms x t
>> y=exp(-x.^2).*conj(exp(-(x+t).^2).*exp(-i.*2.*pi.*(192.31.*t+10.*x)));
>> a=-5:1:5;
>> y=subs(y,t,a);
>> int=int(y,x,-inf,inf);
Warning: Explicit integral could not be found.  
求指教。。
 楼主| 发表于 2014-3-7 11:41 | 显示全部楼层
实际想求的是这样一个积分(下面图片中的函数)
t取对应一组值。
程序clear all;
syms x t
>> y=exp(-x.^2).*conj(exp(-(x+t).^2).*exp(-i.*2.*pi.*(192.31.*t+10.*x)));
>> a=-5:1:5;
>> y=subs(y,t,a);
>> int=int(y,x,-inf,inf);
Warning: Explicit integral could not be found.  
>> in=quad(y,x,-inf,inf);
??? Error using ==> fcnchk at 108
If FUN is a MATLAB object, it must have an feval method.
Error in ==> quad at 66
f = fcnchk(funfcn);
用符号积分和数值积分同样有错误。。
360截图20140307113849683.jpg
 楼主| 发表于 2014-3-7 11:46 | 显示全部楼层
犟牛 发表于 2014-3-7 11:19
请看清楚,你用的是符号积分


实际想求的是这样一个积分(下面图片中的函数)
t取对应一组值。
程序clear all;
syms x t
>> y=exp(-x.^2).*conj(exp(-(x+t).^2).*exp(-i.*2.*pi.*(192.31.*t+10.*x)));
>> a=-5:1:5;
>> y=subs(y,t,a);
>> int=int(y,x,-inf,inf);
Warning: Explicit integral could not be found.  
>> in=quad(y,x,-inf,inf);
??? Error using ==> fcnchk at 108
If FUN is a MATLAB object, it must have an feval method.
Error in ==> quad at 66
f = fcnchk(funfcn);
用符号积分和数值积分同样有错误。。
360截图20140307113849683.jpg
发表于 2014-3-7 11:58 | 显示全部楼层
shuill 发表于 2014-3-7 11:46
实际想求的是这样一个积分(下面图片中的函数)
t取对应一组值。
程序clear all;

数值积分错误那是你的命令使用有问题
quad中的被积函数应该以函数句柄的形式给出
建议好好看一下相关帮助吧,参照帮助里的例子来写,不难
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-5 20:54 , Processed in 0.121775 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表