matlab定积分求解问题,怎么求定积分?function ly=ditui(a)int k x;ly=zeros(1,11);fprintf('请选择方法:');k=input('k=');switch (k)case 1 for i=1:11if i==1ly(1,1)=log((a+1)/a);elsely(1,i)=-a*ly(1,i-1)+1/(i-1);endendcase 2 for i=2:11if i=
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 18:53:30
matlab定积分求解问题,怎么求定积分?function ly=ditui(a)int k x;ly=zeros(1,11);fprintf('请选择方法:');k=input('k=');switch (k)case 1 for i=1:11if i==1ly(1,1)=log((a+1)/a);elsely(1,i)=-a*ly(1,i-1)+1/(i-1);endendcase 2 for i=2:11if i=
matlab定积分求解问题,怎么求定积分?
function ly=ditui(a)
int k x;
ly=zeros(1,11);
fprintf('请选择方法:');
k=input('k=');
switch (k)
case 1
for i=1:11
if i==1
ly(1,1)=log((a+1)/a);
else
ly(1,i)=-a*ly(1,i-1)+1/(i-1);
end
end
case 2
for i=2:11
if i==11
ly(1,11)=quadl(((x^10)/(a+x)),0,1,tol);
else
ly(1,i-1)=(1/a)*(-ly(1,i)+(1/i));
end
end
end
end
最后执行出来 一直出现
Undefined function or variable 'x'.
Error in ==> ditui at 20
ly(1,11)=quadl(((x^10)/(a+x)),0,1,tol);
matlab定积分求解问题,怎么求定积分?function ly=ditui(a)int k x;ly=zeros(1,11);fprintf('请选择方法:');k=input('k=');switch (k)case 1 for i=1:11if i==1ly(1,1)=log((a+1)/a);elsely(1,i)=-a*ly(1,i-1)+1/(i-1);endendcase 2 for i=2:11if i=
第二行不是int
是syms