write a script to find the sum of an array of numbers of the form 2n-10, n = 1,2,…, 10.
2 次查看(过去 30 天)
显示 更早的评论
Using the programming language and Matlab syntax, write a script to find the sum of an array of numbers of the form 2n-10, n = 1,2,…, 10.
回答(1 个)
Dhruv G
2021-6-22
Think about how the ':' is used when defining an array within parantheses or in square brackets. Think about how multiplying an array with a scalar works, and look at how the sum() function in matlab works.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!