필터 지우기
필터 지우기

If I have a matrix of data and I want to pull out certain data cells and arrange them in another matrix?

조회 수: 1 (최근 30일)
More info:
I have a matrix of information and I want to pull certain data cells from all the rows beginning with a 20.
Of the rows starting with the number 20, I want the third cell over.
Ex. I want to grab the cells that are bolded.
10 40 50 80
20 40 20 34
30 50 32 50
20 38 40 36
I want to then take those data cells and put them into a 1 lined matrix

채택된 답변

Thomas
Thomas 2012년 6월 28일
a=[10 40 50 80
20 40 20 34
30 50 32 50
20 38 40 36]
c=find(a(:,1)==20)
out= a(c,3)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by