I have this 4×4 matrix.

I want to get lines 3 and 4 to put them up on the matrix, like:

0 1 1 1 1 1 1 1

1 1 1 1 to 0 1 1 1

1 1 1 1

I've made a 2×4 example to make things easier.

Thanks

Skip to content# MATLAB: Split 2 lines of a matrix

###### Related Question

matrix

I have this 4×4 matrix.

I want to get lines 3 and 4 to put them up on the matrix, like:

0 1 1 1 1 1 1 1

1 1 1 1 to 0 1 1 1

1 1 1 1

I've made a 2×4 example to make things easier.

Thanks

- How can i make matrix 1 1/2 1/3 1/4 … 1/n
- How to add zeros column and row at the beginning of matrix
- Help with hadamard matrix
- Matrix insert with a condition
- I created a zeros (n+1 by n+1) matrix. And I want the value 2*i on the row (2 : n)&(column 1:n-1) , where i is from 1 to n-1, how should I get that? Can anyone help me out
- Understanding indexing and the colon operator

## Best Answer