필터 지우기
필터 지우기

How to read the first term of the file

조회 수: 1 (최근 30일)
Moises Belda
Moises Belda 2019년 6월 7일
답변: Walter Roberson 2019년 6월 7일
Hi, I would know if someone can help me with this. In the file I have, I only need to read the first column (the one which is supposed to be the time). Anyone know how can I do that?
Thanks

채택된 답변

Walter Roberson
Walter Roberson 2019년 6월 7일
It is not possible to read only that column, but it is possible to have only that column saved.
fid = fopen('force.dat', 'r');
times = cell2mat( textscan(fid, '%f%*[^\n]', 'HeaderLines', 4) );
fclose(fid);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by