textscan to read date and time column and numeric data together
조회 수: 1 (최근 30일)
이전 댓글 표시
![dddd](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1052150/dddd.png)
Thank you Stephen23. I am attaching the file. The purpose is to read the file from row 66 to end. After that I want to Connect the columns of the read numbers horizontally. May be by using 'horzcat' command. Thank you
I am new to MatLAB. I want touse textscan command to read the data. the first column is date and time and rest are numeric. can anyone help me in this?
댓글 수: 1
채택된 답변
추가 답변 (1개)
Kshittiz Bhardwaj
2022년 7월 1일
Hello Sohail,
You have to first load open your file in MATLAB and then read each column with the appropriate conversion specifier.
You can refer : TextScan documentation
Personally, I would suggest you to use readTable instead of textScan as it is easier and straight forward
refer: readTable documentation
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!