How do I find the value of the cell from a particular row number
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a data array consisting of 1 row and 4000 columns of data values, I want to find out the value which exists in certain cells, say for example row 1, column 2000, how would i go about this?
2 Commenti
Stephen23
il 1 Ago 2017
"I have a data array ... I want to find out the value which exists in certain cells..."
What do you mean by a "data array": is this a file of some kind, or is it already in the MATLAB workspace?
Risposta accettata
Adam
il 1 Ago 2017
Modificato: Adam
il 1 Ago 2017
myArray{ 1, 2000 }
if it is a cell array or
myArray( 1, 2000 )
if it is a numeric array.
Although when using a 1d array I tend to omit the 1 and just use
myArray( 2000 )
which works equally, but
myArray( row, col )
is the generic acess.
3 Commenti
Image Analyst
il 1 Ago 2017
List your columns in brackets:
extractedColumns = fullData(:, [1000, 2000, 3000, 4000]);
That will give you an array with all the rows and only those 4 columns.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Multidimensional Arrays 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!