How to import a *.prn file into matlab, which contains time and date stamps along with various columns of data.
조회 수: 15 (최근 30일)
이전 댓글 표시
I have a .*prn files ( tab delimited text file), which has 50 columns of data including date and time stamps as the file here. I couldn't upload the prn file so converted it into text. after loading the data, i want to convert time stamp into seconds. Help me writing the code to import the data (manual importing works but i need to import two files with same headings at the same time)
댓글 수: 0
답변 (1개)
Soumya Saxena
2017년 5월 4일
You may convert date stamps to seconds as follows:
t='14:35:59.812'; [Y, M, D, H, MN, S] = datevec(t); H*3600+MN*60+S
You may use the "datevec" function for this.
To read tab delimited text files you may use "tdfread" function:
If you are manually importing data using import tool, you can click on "generate script" , which will create matlab code that you can use later, to use with other files.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!