MATLAB Answers

0

how to load file have header

Asked by joo tan on 14 Dec 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..

  0 Comments

Sign in to comment.

2 Answers

Answer by Fangjun Jiang on 14 Dec 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 Comments

Sign in to comment.


Answer by Walter Roberson
on 14 Dec 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 Comments

Sign in to comment.