Intersection of row and column

6 vues (au cours des 30 derniers jours)
Anca Toma
Anca Toma le 23 Mai 2022
Commenté : Anca Toma le 23 Mai 2022
Hi, I am triyng to make a new with the elements extracted from the intresection of the rows 4,5,6 with the columns 1,3,6 from this matrix.

Réponses (2)

Prakash S R
Prakash S R le 23 Mai 2022
I assume you are trying to form a new 3x3 matrix G from rows and columns of H. You can do this by specifying the indices of interest:
G = H([4,5,6], [1,3,6])
  1 commentaire
Anca Toma
Anca Toma le 23 Mai 2022
thank you!

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 23 Mai 2022
H = [1 0 0 -1 0 0;...
0 1 0 0 -1 0;...
0 0 1 0 0 -1;...
2 0 1 2 0 1;...
1 1 1 1 1 1;...
-1 2 -2 -1 2 -2];
M = H([4,5,6], [1,3,6])
M = 3×3
2 1 1 1 1 1 -1 -2 -2
  1 commentaire
Anca Toma
Anca Toma le 23 Mai 2022
thank you! it works

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by