i have this matrix
PP = 11 8 2 10 1 4 6 5 9 7 12 3 4 3 5 7 6 9 11 1 2 8 12 10 4 11 9 10 12 2 6 5 8 1 7 3 3 9 2 7 6 8 11 12 1 4 10 5
i want to split this matrix into to part
so code like this
v=2p1=[PP(1:v,:)];p2=[PP(PP-v+1:end,:)];
v=2 means that i want to split into two row..
the 1st and 2nd row is in p1, and the 3rd and 4th in p2..
for p1 i got the code correctly however for p2 i didnt get it right
i put v because if the matrix change to 6×6 or 10×10 , i want to change the value of v into what ever i want..
Best Answer