fileName = 'FloatAscentProfile81kg.txt';
txt = readfile(fileName);
pattern='CR4';
for i=1:length(txt)
TF= contains(txt,pattern, 'IgnoreCase', true);
end
CR4=txt(TF);
CTD=cellstr(CR4);
dlmwrite('CTD.txt',CTD,'delimiter','');
%edit CTD.txt
fid =fopen('CTD.txt');
Pressure_dBar= textscan(fid, '%*s %*s %*s %*s %f %*[^\n]','HeaderLines',1);
fid=fclose(fid);