Read from start/end of text file
Read from start/end of text file
I had a 300+GB text file; here is how to read the first and last parts:
fn = 'C:\Users\Paul\AppData\Local\2BrightSparks\SyncBackPro\CLOUD_Debug_Google drive data backup - T drive (Study Data, Collaborations).txt';
id = fopen(fn, 'r');
str0 = fread(id,500,'char'); % first 500 characters
fseek(id,-1000,'eof') % last 1000 characters
str1 = fread(id,1000,'char');
fclose(id)
char(str0)'
char(str1)'
, multiple selections available,
Related content
json reading and writing in MATLAB
json reading and writing in MATLAB
More like this
T1 Files and fields
T1 Files and fields
More like this
Raw data
Raw data
More like this
CONN Programming Notes
CONN Programming Notes
More like this
Single Subject: Manually Running and Checking Segmentations
Single Subject: Manually Running and Checking Segmentations
More like this
fMRI Load Slice Timing Infomation (optional)
fMRI Load Slice Timing Infomation (optional)
More like this