help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing data that contains a mix of numerical and string data


From: PhilipNienhuis
Subject: Re: Importing data that contains a mix of numerical and string data
Date: Tue, 13 Nov 2018 13:09:17 -0600 (CST)

Owen Cail wrote
> I'll start by saying I'm in the process of moving from Matlab to Octave.
> 
> I am trying to import data from a text file, such as the example below:
> 
> date,             time,               value1,  value2
> 2018-11-12, 15:44:21.123, 13,        205
> 2018-11-12, 15:44:22.123, 17,        201
> 
> The result of is a struct with two fields: one called data, and one called
> textdata:
> 
>   data =
> 
>         13   205
>         17   201
> 
>      textdata =
>     {
>       [1,1] = date,       time,         value1, value2
>       [2,1] = 2018-11-12
>       [3,1] =  15:44:21.123
>       [4,1] = 2018-11-12
>       [5,1] =  15:44:22.123
>     }
> 
> The data part is exactly what I would expect, but the textdata result is
> in
> a form that is not very useful.  In Matlab, I was able to have a column
> full of dates and a column full of times.  The header being all in one
> cell
> is weird but is fine.  My issue is that both columns of data are combined
> in to one column.
> 
> Is this intended behavior and I should just deal with it?  Or can I submit
> a bug report with these details?

How would you read this with matlab? Any code example?

P



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]