how to load file have header
조회 수: 13 (최근 30일)
이전 댓글 표시
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
답변 (2개)
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.
댓글 수: 0
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"
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Export에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!