필터 지우기
필터 지우기

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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by