MATLAB: Selection of rows and columns of a data set.

matrix

Hi everybody, I have a file in text format (from Physionet.org) having six columns and some hundreds rows. I need all rows but only the second column. What would be please the right command?
Many thanks for your help!

Best Answer

You have to read all values.
fid = fopen(FileName, 'r');
data = fscanf(fid, '%g', [6, inf]);
fclose(fid);
result = data(2, :);