Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
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

Réponse acceptée

Thomas
Thomas le 28 Juin 2012
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)

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by