Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: extracting specific numbers from a vector or a matrix
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
fmri

Posts: 42
Registered: 5/1/13
extracting specific numbers from a vector or a matrix
Posted: May 1, 2013 6:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi

If I have a matrix that contains two vectors each value is related to the corresponded one... eg :
matrix: 2 4 6 8 10 12 14 16 ....etc
3 4 3 3 5 6 7 8 ....etc

These numbers represent two groups: groups. each group last for 30 times then the other group starts and so one....the length of it is 1400 and I want is to extract the values for group 1 which will be 700.

To rexplain it again :

group a starts the matrix until the 30 elements and then group b until the 60 and then group a until the 90 and the group b until the 120 ...so on.

I found a way here in the forum after search of extracting the six element every time but I could not figure out how to do what I want ..
var = MyMatrix (:5:end, 2);

Thanks in advance



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.