Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to read values from a file

1 visualización (últimos 30 días)
John Hock
John Hock el 14 de Jul. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi All I had a data containing lets say 3000 values I just want to read first 100 values from the data then next 100 values and then next 100 values and so on... Anyone plz help
  7 comentarios
John Hock
John Hock el 15 de Jul. de 2018
Thnx @dpb for your time My main question is that lets assume i have 20 values in my data set lets say (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)i just want to read first 5 values (i.e 1 2 3 4 5)then next 5 (6 7 8 9 10)and so on Will you please help me how i can do this
dpb
dpb el 15 de Jul. de 2018
Editada: dpb el 16 de Jul. de 2018
This is akin to the problem of creating named sequential variables; not as problematic but still indicative of a non-optimal coding solution.
As you can tell, we're rather reluctant to lead folks down what may be non-productive paths, but if you're absolutely adamant and still won't share sufficient information to lead to a better solution, look at the optional 'N' arguments in functions like textread, fscanf.
You may also find while and feof of use...

Respuestas (0)

Etiquetas

Productos


Versión

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by