how to extract this data?
Show older comments
Accepted Answer
More Answers (1)
dpb
on 4 Feb 2016
As noted above, w/o a file to test, something like
fid=fopen('yourfile'); % open file
d=cell2mat(textscanf(fid,'','headerlines',4)); % read numeric data (Nx3 array)
fid=fclose(fid); % done w/ file
ix=[find(d(:,1)==0);length(d)+1]; % locations of segment breaks in data plus end
for i=1:length(ix)-1 % over the number of breaks
data{i}=d(ix(i):ix(i+1)),3); % save each group as a cell array
end
Do whatever with the contents of data for each cell as desired.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


