Summation with For Loop 2
1 view (last 30 days)
Show older comments
Jwo Jiunn Kon
on 24 Apr 2021
Commented: Jwo Jiunn Kon
on 29 Apr 2021
Hi, wanted to ask how to i do summation for this loop? Thanks for any help.
2 Comments
Scott MacKenzie
on 24 Apr 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.
Accepted Answer
Tarunbir Gambhir
on 27 Apr 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 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!