Borrar filtros
Borrar filtros

How do I find the value of the cell from a particular row number

1 visualización (últimos 30 días)
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 comentarios
Stephen23
Stephen23 el 1 de Ag. de 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?

Iniciar sesión para comentar.

Respuesta aceptada

Adam
Adam el 1 de Ag. de 2017
Editada: Adam el 1 de Ag. de 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 comentarios
Image Analyst
Image Analyst el 1 de Ag. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by