查看单个帖子
旧 2009-05-19, 10:29   #3
geraint12
初级会员
 
注册日期: 2008-12-03
年龄: 41
帖子: 4
声望力: 0
geraint12 正向着好的方向发展
微笑 回复: [求助]包含阶乘的求和 如何输出

引用:
作者: TTT_IOU 查看帖子
不知下程序可否:
syms k
x=0:40;
y=1-(exp(-5)*symsum((1/gamma(k+1))*(5^k),k,0,8)+...
((1+x)./x).^9.*(exp(-(10./(2*(1+x))))-...
exp(-5)*symsum((1/gamma(k+1))*(10*x./(2*(1+x)).^k),k,0,8)));
y=subs(y,'x',x);
plot(x,y)
axis([0,40,0.0001,1]);
希望有帮助!!不过去掉axis或改变范围图像更理想!!
多谢你的回复
运行后出现如下错误 请继续指点 多谢
Error using ==> plot
Vectors must be the same lengths.

Error in ==> yin123 at 6
plot(x,y)
geraint12 当前离线   回复时引用此帖