Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


fmri
Posts:
42
Registered:
5/1/13


extracting specific numbers from a vector or a matrix
Posted:
May 1, 2013 6:21 PM


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



