How to write a program to find the Factorial for a series of number
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohamed Rashad
am 25 Sep. 2021
Beantwortet: Star Strider
am 25 Sep. 2021
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 Kommentare
Akzeptierte Antwort
Star Strider
am 25 Sep. 2021
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!