How can my script calculate 1^3 + 2^3 + ⋯ + 10^3 + 11^3 using a for/while loop in matlab?

1 次查看(过去 30 天)
I'm interested to see how I could calculate 1^3 + 2^3.... 11^3 using for/ while loops.
If I used vectors, how would this differ?

回答(1 个)

madhan ravi
madhan ravi 2019-1-14
编辑:madhan ravi 2019-1-14
help sum
help cumsum

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by