How to write a program to find the Factorial for a series of number
2 次查看(过去 30 天)
显示 更早的评论
If I wanted to find the Factorial for 1/1! + 2/2! + 3/3! ...+ n/n!. How to take the series as user input and display the output.?
0 个评论
采纳的回答
Star Strider
2021-9-25
Take advantage of MATLAB’s vectorisation capability —
N = 10;
ff = (1:N) ./ cumprod(1:N)
ffsum = sum(ff)
Make appropriate changes to get different results.
.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!