Reading a data starting with zeros
조회 수: 4 (최근 30일)
이전 댓글 표시
Dear members
I have the following data from a text file:
1 23948U 96040A 96214.98321868 .00000118 00000-0 00000+0 0 464
2 23948 0.0614 236.9184 0001375 279.5530 174.2840 1.00271670 256
In line 2 the term '0001375' I want to read it as '0.0001375' but actually when I read this term it is read as '1375'.
Any solution to this?
I am using the following code to read it.
ecc=str2double(L2(5)); %L2 is line 2 (I have split the lines as L1 and L2)
댓글 수: 2
Image Analyst
2013년 2월 16일
Why is it wrong in the first place? What wrote out this incorrect data? Can you fix it there so it doesn't get written out incorrectly in the first place? Also, what do you want to do with terms that have letters (U, A like line #1) attached to them?
채택된 답변
추가 답변 (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!