how to extract this data?
Mostrar comentarios más antiguos
Anyone,
I want to extract the data in the end row.
The meaningful data comes every "0" changes in the first row...
Best,

Pen
Respuesta aceptada
Más respuestas (1)
dpb
el 4 de Feb. de 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 comentario
Pengju
el 4 de Feb. de 2016
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


