Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How do i convert a text format into respective numeric vectors?

조회 수: 1 (최근 30일)
Parth Sarathi
Parth Sarathi 2016년 5월 17일
마감: MATLAB Answer Bot 2021년 8월 20일
I am having a 'raw' file with 3 columns as in the attached file 'test'. I want to read the first column as datenum or datevec but it is not doing so. Can you please let me know how can i convert the first column into its respective vector. So that i can read it as datenum function. Thanking you, Kind regards, Parth

답변 (1개)

Walter Roberson
Walter Roberson 2016년 5월 17일
cellfun(@(S) datetime(S(2:end-1)), raw(:,1))
The quote marks in the cell are interfering with the automatic interpretation of the data.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by