Borrar filtros
Borrar filtros

take matrix out of ascii file

1 visualización (últimos 30 días)
Fiboehh
Fiboehh el 21 de Abr. de 2011
Hellow, i need code to get numbers in matrixes out of a ascii file. My file has a structure like this:
name - figer
date - 18/04/2010
operator - HSV
sourve - HeNe laser
...
slice 1
0 1 0 1 0.1
1 0 1 1 0.46
0 1 0 1 2
1 0 2 3 6
slice 2
0 2 1 1
1 2 3 6
0.23 2 5 4
0.56 9 3 6
0 1 0 0 1
0 1 1 2
slice 3
...
%till
slice n
So i need a matrix for all the numbers under the first slice, a new one for the second slice and so on. I don't know on forehand how mutch slices there are so i have to search that, and fill so many matrices up. Thx in advanced

Respuesta aceptada

Andrew Newell
Andrew Newell el 21 de Abr. de 2011
You should be able to do it with textscan. Try adapting this demo.

Más respuestas (0)

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by