HOW TO WRITE SUMMATION FORM ∑_(i=1) (L-1)
显示 更早的评论
回答(2 个)
Laurent
2013-9-4
0 个投票
Make an appropriate vector with the values that you want to sum (or select the values from an array containing them) and use the command 'sum'.
Are you trying to sum the first 256 elements of an array? If so, you would do as follows
sum(x(1:256))
Or, if length(x) is 256, then you would just do
sum(x)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!