help-octave
[Top][All Lists]
Advanced

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

Importing data that contains a mix of numerical and string data


From: Owen Cail
Subject: Importing data that contains a mix of numerical and string data
Date: Mon, 12 Nov 2018 16:37:36 -0600

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?

reply via email to

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