How to extract specific data from a matrix?

9 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Stephen23
Stephen23 il 19 Giu 2015
Modificato: Stephen23 il 19 Giu 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:

Più risposte (0)

Categorie

Scopri di più su Networks 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