How to convert large text file into individual cells into 1x408 array
조회 수: 3 (최근 30일)
이전 댓글 표시
I need to convert a large text file that I can make look like this:
00
11
22
33
...
408
or like this: 00 11 22 33 ... 408 via notepad++.
I want to take this and put it into a 1x408 so I can work with it. The array should be [00][11][22][33].
What I have tried is this:
filename = '2020_06_01_08_27_17exp2.txt';
delimiterIn = '\n';
A = importdata(filename, delimiterIn);
and also this
filename = '2020_06_01_08_27_17exp2.txt';
fileID = fopen(filename, 'r');
formatSpec = '%f';
A = fscanf(fileID, formatSpec);
fclose(fileID);
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!