软件编程版 #185033 层

matlab能否做幂级数求和

楼主 · 1 楼
有人问了我一个问题,怎么用matlab求幂级数的和函数,没想出来。求助。
2 楼
可以把你的问题说明的详细点么:)
3 楼
例子

>> syms x t k
>> symsum(x^k*t^k/factorial(k),k,0,inf)
??? Error using ==> fix
Function 'fix' is not defined for values of class 'sym'.

Error in ==> D:\MATLAB6p5p1\toolbox\matlab\specfun\factorial.m
On line 14 ==> if (length(n)~=1) | (fix(n) ~= n) | (n < 0)

查帮助后知道,该这样
>> symsum(x^k*t^k/sym('k!'),k,0,inf)

ans =
exp(x*t)