how to load file have header

13 次查看(过去 30 天)
joo tan
joo tan 2011-12-14
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..

回答(2 个)

Fangjun Jiang
Fangjun Jiang 2011-12-14
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 2011-12-14
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"

类别

Help CenterFile Exchange 中查找有关 Data Import and Export 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by