필터 지우기
필터 지우기

create a new matrix that extracts the values in matrix A as stipulated in matrix B

조회 수: 1 (최근 30일)
Hello all,
I have a matrix A = [4; 8; 12; 16] where each row refers to a row in another matrix. For instance the other matrix is B = [12; 22; 7;45; 8; 52;48; 55; 34; 2; 14; 33; 2; 78; 14; 10; 18] and A(4,1) refers to the value 45 in B as it is the 4th value in the column.
My question is how can I create a new matrix that extracts the values in B as stipulated in A. For instance using the example above C = [45; 55;33;10].
Any suggestions would be very welcome!

채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 12월 5일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by