how to extract this data?
Afficher commentaires plus anciens
Réponse acceptée
Plus de réponses (1)
dpb
le 4 Fév 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.
1 commentaire
Pengju
le 4 Fév 2016
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



