不定积分的问题。

8 次查看(过去 30 天)
jiyerw
jiyerw 2022-11-24
回答: watog 2022-11-24
这样一段代码
clear;clc
syms x
y0=0.3*10^-3*x^3;
y1=0.3*10^-3*x^5;
w1=y0+y1;
o1=int(w1);
p1=100*(y1/10+y0/8)*x^-2*exp(-2*o1);
rcs=p1*x^2;
pdx=-log(p1*x^2);
e=exp(-pdx);
Sum=int(e);
ezplot(Sum);
运行时候出错:
??? Error using ==> inlineeval at 15
Error in inline expression ==> int(((3.*x.^5)./1000 +
(3.*x.^3)./800)./exp((x.^4.*(2.*x.^2 + 3))./20000), x)
Undefined function or method 'int' for input arguments of type 'double'.
Error in ==> inline.feval at 36
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr,
INLINE_OBJ_.expr);
Error in ==> ezplotfeval at 52
z = feval(f,x(1));
Error in ==> ezplot>ezplot1 at 464
[y,f,loopflag] = ezplotfeval(f,x);
Error in ==> ezplot at 144
[hp,cax] = ezplot1(cax,f{1},vars,labels,args{:});
Error in ==> sym.ezplot at 45
h = ezplot(char(f));
Error in ==> question at 12
ezplot(Sum);
其中,e的表达式为
((3*x^5)/1000 + (3*x^3)/800)/exp((x^4*(2*x^2 + 3))/20000)
Sum的表达式为
int(((3*x^5)/1000 + (3*x^3)/800)/exp((x^4*(2*x^2 + 3))/20000), x)
为什么Sum没有积出来,而是保留了int的形式?是不是这个表达式本身就积不出来?如果是的话,那要怎么办才能把图画出来呢

采纳的回答

watog
watog 2022-11-24
integral是2012a出现的函数,你的版本比较老没有这个函数,可以用quadv替代:
Sum=@(x)quadv(@(t)ef(t*x).*x,0,1);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 函数基础知识 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!