如何用matlab解下面这个积分?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/05 19:04:17
如何用matlab解下面这个积分?
我想用matlab来计算下面这个积分的积分值.
输入:
fun=inline('(1/(((2*pi).^0.5)*4.123)*exp(-1*((x-22.334).^2/34.002)))*(-0.026*x.^2+1.126*x-11.05)');
q=quad(fun,15,20);
运行后提示错误:
Error using ==> inlineeval
Error in inline expression ==> (1/(((2*pi).^0.5)*4.123))*(exp(-1*(((x-22.334).^2)/34.002)))*(-0.026*(x.^2)+1.126*x-11.05)
Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> inline.subsref at 25
INLINE_OUT_ = inlineeval(INLINE_INPUTS_,INLINE_OBJ_.inputExpr,INLINE_OBJ_.expr);
Error in ==> quad at 62
y = f(x,varargin{:});
请问这个积分该怎么计算啊?
我想用matlab来计算下面这个积分的积分值.
输入:
fun=inline('(1/(((2*pi).^0.5)*4.123)*exp(-1*((x-22.334).^2/34.002)))*(-0.026*x.^2+1.126*x-11.05)');
q=quad(fun,15,20);
运行后提示错误:
Error using ==> inlineeval
Error in inline expression ==> (1/(((2*pi).^0.5)*4.123))*(exp(-1*(((x-22.334).^2)/34.002)))*(-0.026*(x.^2)+1.126*x-11.05)
Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> inline.subsref at 25
INLINE_OUT_ = inlineeval(INLINE_INPUTS_,INLINE_OBJ_.inputExpr,INLINE_OBJ_.expr);
Error in ==> quad at 62
y = f(x,varargin{:});
请问这个积分该怎么计算啊?
点乘啊点乘
fun=inline('(1/(((2*pi).^0.5)*4.123)*exp(-1*((x-22.334).^2/34.002))).*(-0.026*x.^2+1.126*x-11.05)');
q=quad(fun,15,20);
fun=inline('(1/(((2*pi).^0.5)*4.123)*exp(-1*((x-22.334).^2/34.002))).*(-0.026*x.^2+1.126*x-11.05)');
q=quad(fun,15,20);