作业帮 > 综合 > 作业

matlab求定积分报错The integrand function must return an output vec

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/05/02 18:43:30
matlab求定积分报错The integrand function must return an output vector of the same length as the i
>> df=@(x)exp(x)*(exp(x))'
df =
@(x)exp(x)*(exp(x))'
>> quad(df,0,1)
Error using quad (line 75)
The integrand function must return an output vector of the same length as the input vector.
求教exp(x)*exp(x)'的定积分如何求得?
matlab求定积分报错The integrand function must return an output vec
df=@(x) exp(x).*exp(x) % 数值积分要用 点乘
quad(df,0,1)
df =
@(x)exp(x).*exp(x)
ans =
3.1945
再问: 第二个exp(x)是共轭转置的
再答: 没明白
再问: 是求解exp(x)*exp(x)'的定积分不是exp(x)*exp(x)的,只是实验中公式的简化而已,原来是求 a(x)乘a(x)的共轭转置 的定积分,exp(x)是a(x)表达式的一部分,请不必考虑计算的实际意义,多谢赐教。
再答: 不好意思,水平有限