Summation with For Loop 2
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jwo Jiunn Kon
le 24 Avr 2021
Commenté : Jwo Jiunn Kon
le 29 Avr 2021
Hi, wanted to ask how to i do summation for this loop? Thanks for any help.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/595265/image.jpeg)
2 commentaires
Scott MacKenzie
le 24 Avr 2021
If the f-terms are in arrays A and B. Then the solution is
sum(abs(A)) - abs(sum(B))
Of course, you'll need to do the work of computing A and B. But, your question was about summation.
Réponse acceptée
Tarunbir Gambhir
le 27 Avr 2021
If you want to compute the sum of the f-terms as symbolic functions, you can use the symsum function to get the sum of your series. You can refer the examples on the documentation page to understand how to use this function.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!