how to load file have header

14 visualizaciones (últimos 30 días)
joo tan
joo tan el 14 de Dic. de 2011
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..

Respuestas (2)

Fangjun Jiang
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.

Walter Roberson
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"

Categorías

Más información sobre Data Import and Export 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