MATLAB: How to extract specific data from a matrix

datagraphmatrices

Hi there,
I have a 100001×7 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.

Best Answer

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:
Related Question