How can i read 14,000 data points from a file?
조회 수: 2 (최근 30일)
이전 댓글 표시
i read the datapoints by using importdata... but this is not suited for large number of data points....i have to design a notch filter with this data....so i have to read 14000 data points from a file.... what i have to do??
댓글 수: 4
Walter Roberson
2014년 2월 12일
How many columns per line? What separator between columns? Are there any headers? What would a typical line look like?
채택된 답변
Walter Roberson
2014년 2월 12일
fid = fopen('YourFile.txt');
datacell = textscan(fid, '%f%f', 14000, 'CollectOutput', 1);
fclose(fid);
youdata = datacell{1};
댓글 수: 3
Walter Roberson
2014년 2월 13일
This is the reason I asked about the file format.
fid = fopen('YourFile.txt'); datacell = textscan(fid, '%*f%f%f%*f%*f%*f%*f', 14000); fclose(fid); A = datacell{1}; B = datacell{2}; C=A-B;
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!