How to write a program to find the Factorial for a series of number
조회 수: 1 (최근 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!