Search All of the Math Forum:

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

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

Topic: How to a 1-D matrix into several 1-D matrix based on condition
Replies: 5   Last Post: Dec 8, 2012 4:36 PM

 Messages: [ Previous | Next ]
 S Ehtesham Al Hanif Posts: 9 Registered: 12/1/12
How to a 1-D matrix into several 1-D matrix based on condition
Posted: Dec 8, 2012 2:15 PM

Suppose I have matrix A like below:

A
1
3
5
7
8
1
4
0
1
4
6
3
0
0
1
4
6
0
0
0
2
5
9
1

Now I want to divide these into a few groups (1 D matrix) based on one condition that is when in that matrix i will reach 0 it will generate a 1-D matrix up to this such as below mentioned B,C,D,E.

For my A matrix: the result will be

B
1
3
5
7
8
1
4
0

C
1
4
6
3
0

D
0
1
4
6
0

E
0
0
2
5
9
1

Can anybody suggest me how to do this?

Date Subject Author
12/8/12 S Ehtesham Al Hanif
12/8/12 dpb
12/8/12 james bejon
12/8/12 dpb
12/8/12 S Ehtesham Al Hanif
12/8/12 dpb