2010-12-19

[Math]用matlab求数组的n次方和

 data=0:31
data =
Columns 1 through 17
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Columns 18 through 32
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
>> sum(data.^3)
ans =
  246016

本文地址:http://114er.blogspot.com/2010/12/mathmatlabn.html
原创文章如转载,请注明链接: 转自Welcome Funny Guys

0 评论: