how to truncate the matrix in matlab

Status
Not open for further replies.

moonnightingale

Full Member level 6
Joined
Sep 17, 2009
Messages
362
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
3,832
I am having matrix A of about 2000 rows like following

A = 0 1 1 0 1 0
0 0 0 1 1 1
1 1 0 0 1 1
0 0 0 1 1 1

I want to make a new matrib B in which first three columns are finished and last three columns stay there like this

B = 0 1 0
1 1 1
0 1 1
1 1 1

kindly help me in matlab
 

A =

0 1 1 0 1 0
0 0 0 1 1 1
1 1 0 0 1 1
0 0 0 1 1 1

B=A,4:6)

B =

0 1 0
1 1 1
0 1 1
1 1 1


if that is ur answer then click help button
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…