Removing /eliminating bottom rows of a matrix

2 Ansichten (letzte 30 Tage)
Rutika Titre
Rutika Titre am 30 Nov. 2015
Kommentiert: Rutika Titre am 30 Nov. 2015
I have a matrix imat=[1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0]; and a matrix imat= [0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0] I want 'mat' matrix as the size of 'imat' matrix. mat size is 8X8 and mat=5X5. I want to remove the three rows of mat matrix. Can anyone help please.

Akzeptierte Antwort

William
William am 30 Nov. 2015
You named both matrices imat here. For 8x8 matrix named mat, for the first 5 columns and rows i.e. 5x5:
mat(1:5,1:5)
  1 Kommentar
Rutika Titre
Rutika Titre am 30 Nov. 2015
hello Sir, It worked. Thanks a lot I was trying'[]'. What I wanted was mat (1:5,1:8). I got it my output.Thanks a lot.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by