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