Clear Filters
Clear Filters

Selection of rows and columns of a data set.

1 view (last 30 days)
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!

Accepted Answer

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

More Answers (0)

Categories

Find more on Text Data Preparation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!