How to extract specific data from a matrix?

9 visualizaciones (últimos 30 días)
Scott Dallas
Scott Dallas el 19 de Jun. de 2015
Editada: Stephen23 el 19 de Jun. de 2015
Hi there,
I have a 100001x7 matrix that contains data, the first column is time and the other columns contain the values of some time-dependent functions at each time point. I would like to disregard the first 50000 rows and only look at the last part of the matrix in order to create a graph analyzing the period of one of the functions in Matlab. Could someone give me advice on how to do this? I know how to use ftt to analyse the period over all time points but not sure how to restrict it to just the last part.
Thanks, Scott.

Respuesta aceptada

Stephen23
Stephen23 el 19 de Jun. de 2015
Editada: Stephen23 el 19 de Jun. de 2015
You can use indexing to access any subset of an array:
>> X = rand(100001,7); % whole matrix
>> Y = X(50001:end,:); % from row 50001 to the last row
This is covered in MATLAB's introductory tutorials:

Más respuestas (0)

Categorías

Más información sobre Networks 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