The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to vectorize this matrix indexing
Replies: 1   Last Post: Dec 28, 2012 8:27 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 12
Registered: 9/29/12
How to vectorize this matrix indexing
Posted: Dec 28, 2012 8:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Does anyone have an idea on vectorizing the for loop in the following program?

b=[2 4 1 3 2 3 1 2 4 1]'

for m=1:10

'b' is an index array for selecting a certain column. The index is different for different rows. Any suggestions? Thanks.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.