How to set Reallyl Basic iterative sum
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to sum up all n*sin(n*x)-terms. I've found that
f = n*sin(n*x)
for n = 1:10
f(n+1) = n*sin(n*x);
end
sum(f)
works. However, in my view it's not that elegant. In other words, how to implement without using 'sum'?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!