Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

2 vues (au cours des 30 derniers jours)
Parth Sarathi
Parth Sarathi le 17 Mai 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (1)

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

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by