Borrar filtros
Borrar filtros

How can i write formatspecififcation regarding to amount of my line?

1 visualización (últimos 30 días)
cemsi888
cemsi888 el 5 de Mzo. de 2015
Comentada: Adam el 5 de Mzo. de 2015
Now i am reading like txt files .first Comes Parameters than values. Every measurement file have different number of values that's why formatSpecification changes. Exmaple:
formatSpec4 = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%........%[^\n\r]';
(s* amount of-line) how can i define my format specification regarding to line number?
  7 comentarios
cemsi888
cemsi888 el 5 de Mzo. de 2015
i can create desired amount of s and combined[^\n\r] but when i want read datas it gives me error.
Wertepar = textscan(fid1, formatSpec, lines-Gesamtzeile{1,1}, 'Delimiter', delimiter1, 'HeaderLines', Gesamtzeile{1,1}, 'ReturnOnError', false)´
program assume that formatspec ist just= %s
i used debug and wrote
a=fprintf('[^\\n\\r]',formatspec)
it gives me as a result 7.than i used num2str to convert number to string however it does not work too...
Adam
Adam el 5 de Mzo. de 2015
If the formatspec is a string why are you calling num2str on it?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Text Data Preparation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by