Matrix Extraction based on summation.

1 回表示 (過去 30 日間)
Fayyaz
Fayyaz 2015 年 4 月 7 日
回答済み: John D'Errico 2015 年 4 月 7 日
Hi.
I have 81*81 matrix. I need to extract a matrix from that, for example of order 81*2, which include two columns i.e. the 34th column and the sum of 22,39 and 59 columns.
I will be really thankful for any suggestion or help. Thanks

採用された回答

John D'Errico
John D'Errico 2015 年 4 月 7 日
Easy peasy.
B = A(:,[34 22 39 59])*[1 0 0 0;0 1 1 1]';

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by