retrive specific column value from a matrix

조회 수: 1 (최근 30일)
Mohammad Golam Kibria
Mohammad Golam Kibria 2011년 6월 13일
Hi,
suppose I have a matrix I as follows:
I =
1 2 5 1 8 1 8
1 2 8 8 8 1 1
1 2 1 1 1 1 1
1 2 5 2 1 1 1
1 1 1 1 1 5 1
1 1 1 1 1 1 1
I need the value of column 4 and 5 where column 2 have value value 2
can any one help?

채택된 답변

Jan
Jan 2011년 6월 13일
R = I(I(:, 2) == 2, 4:5)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Math에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by