usefulcodes.blogspot.com
AboutME
ajabgajabBLOG
nabinkm.com
NewPost
Sunday, September 27, 2009
faster way to sum desired matrix elements in matlab
Just works
g = rand(5)
p = blkdiag(1,1,0,1,1)
index = find(p~=0)
sum(g(index))
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment