how to load file have header
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have a few file have header..before this i just load function..for file have header , can not..the example file is like below
Day1, Day2, Day3, Day4, Day5, Day6, Day7,
95.01, 76.21, 61.54, 40.57, 5.79, 20.28, 1.53,
23.11, 45.65, 79.19, 93.55, 35.29, 19.87, 74.68,
60.68, 1.85, 92.18, 91.69, 81.32, 60.38, 44.51,
48.60, 82.14, 73.82, 41.03, 0.99, 27.22, 93.18,
89.3, 44.47, 17.63, 89.36, 13.89, 19.88, 46.60,
i need to skip the header..i try use dlmread but problem with "," sign..i try use textscan but problem to read..my idea, after load, i will use the value to get another value..
0 comentarios
Respuestas (2)
Fangjun Jiang
el 14 de Dic. de 2011
use a=importdata('Data.txt')
or b=uiimport('Data.csv') and then generate code.
You need to fix the head and tail of your question. Incomplete sentence, hard to understand.
0 comentarios
Walter Roberson
el 14 de Dic. de 2011
Use the same code I posted for your earlier question http://www.mathworks.com/matlabcentral/answers/23055-remove-header-in-file but change the 6 to a 7 in the statement that assigns to the variable "fmt"
0 comentarios
Ver también
Categorías
Más información sobre Text Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!