Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Thomas
Thomas il 28 Giu 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)

Più risposte (0)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by