フィルターのクリア

Intersection of row and column

1 回表示 (過去 30 日間)
Anca Toma
Anca Toma 2022 年 5 月 23 日
コメント済み: Anca Toma 2022 年 5 月 23 日
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.

回答 (2 件)

Prakash S R
Prakash S R 2022 年 5 月 23 日
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 件のコメント
Anca Toma
Anca Toma 2022 年 5 月 23 日
thank you!

サインインしてコメントする。


Image Analyst
Image Analyst 2022 年 5 月 23 日
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 件のコメント
Anca Toma
Anca Toma 2022 年 5 月 23 日
thank you! it works

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by