MatLab符号计算,求和.
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/09 09:47:30
MatLab符号计算,求和.
对于x>0 ,f=(2/(2*k+1))*(((x-1)/(x+1))^(2*k+1)),函数f对k从0到无穷求和 .(提示:理论结果为ln x ).
matlab里我的代码:
syms k;syms x positive;f=(2/(2*k+1))*(((x-1)/(x+1))^(2*k+1));
s=simple(symsum(f,k,0,inf))
结果:s =
piecewise([abs(x - 1) < x + 1,log(x)])
怎样才能只显示log(x)啊?
对于x>0 ,f=(2/(2*k+1))*(((x-1)/(x+1))^(2*k+1)),函数f对k从0到无穷求和 .(提示:理论结果为ln x ).
matlab里我的代码:
syms k;syms x positive;f=(2/(2*k+1))*(((x-1)/(x+1))^(2*k+1));
s=simple(symsum(f,k,0,inf))
结果:s =
piecewise([abs(x - 1) < x + 1,log(x)])
怎样才能只显示log(x)啊?
如果不是很大的数组的话,手动拆