How to plot this on a graph
显示 更早的评论
how do u plot this between 0 and 2
syms n x
F = symsum(1/factorial(n),n,1,5)
采纳的回答
There is no 'x' in your expression inside symsum(). I guess you are tyring to plot taylor series of exp(x). Try this
syms n x
F = symsum(x^n/factorial(n),n,0,5);
fplot(F, [0 2])
9 个评论
its a power series which is close to the taylor but still a little different but i was wrong its (n+1)(n+1)-(n-2)/n!
so if u can show how to plot that i would be gratefull
Where is 'x' in your series?
Can you show the mathematical form of your equations?
i was right the first time its 1/n! but the maths behind is in the picture its too long too write
If you just want to plot 1/n! then you will just get a straight line becuase there is no dependency on 'x'
syms n x
F = symsum(1/factorial(n),n,0,5);
fplot(F, [0 2])
if u put the numbers in 1, 1/2,1/6,1/24,1/120, 1/720. thats obviously not a straight line
But the original question had a reference to symsum() and x range from [0 2], so that was confusing. If you just want to plot 1/n! then you can do it like this
n = 1:5;
y = 1./factorial(n);
plot(n, y)
sorry for the confusion but in the question we are given its plot the corresponding polynomial over the range 0 ≤ x ≤ 2
But how do you define the polynomial from the series of 1/n!. If you look at my original answer. It does create a polynomial.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
