help-octave
[Top][All Lists]
Advanced

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

Re: Reading/Manipulating a csv file with columns that have different dat


From: Thomas D. Dean
Subject: Re: Reading/Manipulating a csv file with columns that have different data types
Date: Tue, 21 Apr 2015 11:02:51 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 04/21/15 08:13, frobeniustaco wrote:
Hi folks!

----------

First off, here is a small sample of the data I'm working with:

1/7/2015,0,Day,39,8346,32,10,5,0
1/8/2015,0,Day,39,4204,32,7,3,0
1/9/2015,0,Day,39,6848,29,6,6,0

----------

Here's what I want to do with it, once I get it read into Octave:

Columns 1, 3, and 4:  I'll want to sort by month, shift (there will b 3
different strings as values) and machine id (also 3 different values).
octave:40> pkg load io
octave:41> Z=csv2cell('xx.dat')
octave:42> A=cell2mat(Z(1:3,6:8))

Tom Dean



reply via email to

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