Import Large Text File instructions

조회 수: 2 (최근 30일)
Pete
Pete 2014년 8월 26일
편집: dpb 2014년 8월 26일
I've reread the instructions for using textscan from this page
The site provides the following data, which has 2 blocks of data
## A ID = 02476
## YKZ Timestamp Temp Humidity Wind Weather
06-Sep-2013 01:00:00 6.6 89 4 clear
06-Sep-2013 05:00:00 5.9 95 1 clear
06-Sep-2013 09:00:00 15.6 51 5 mainly clear
06-Sep-2013 13:00:00 19.6 37 10 mainly clear
06-Sep-2013 17:00:00 22.4 41 9 mostly cloudy
06-Sep-2013 21:00:00 17.3 67 7 mainly clear
## B ID = 02477
## YVR Timestamp Temp Humidity Wind Weather
09-Sep-2013 01:00:00 15.2 91 8 clear
09-Sep-2013 05:00:00 19.1 94 7 n/a
09-Sep-2013 09:00:00 18.5 94 4 fog
09-Sep-2013 13:00:00 20.1 81 15 mainly clear
09-Sep-2013 17:00:00 20.1 77 17 n/a
09-Sep-2013 18:00:00 20.0 75 17 n/a
09-Sep-2013 21:00:00 16.8 90 25 mainly clear
## C ID = 02478
## YYZ Timestamp Temp Humidity Wind Weather
What is the third figure for Block 3 plotting?

답변 (1개)

dpb
dpb 2014년 8월 26일
편집: dpb 2014년 8월 26일
The first example reads the data in sets "blocks" of 5 repeats of the lines matching the format string. Since there are two groups of data with 6 and 7 lines, respectively, the third group read in fixed blocks of 5/block is the last three points of the thirteen total.

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by