how do i write a matlab script to sum this expression?
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Stephan
am 24 Nov. 2020
Symbolic:
syms n positive integer
N = 10000;
eq = 1/n + 1/((n+2)*(n+3));
pretty(eq)
sol = symsum(eq,n,1,N)
sol_num = double(sol)
results in:
>> Untitled
1 1
--------------- + -
(n + 2) (n + 3) n
sol =
eulergamma + psi(10001) + 10000/30009
sol_num =
10.1208
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!