[Top][All Lists]

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

Re: Textscan and csv fitness data problem

From: PhilipNienhuis
Subject: Re: Textscan and csv fitness data problem
Date: Mon, 1 Jan 2018 10:12:35 -0700 (MST)

NJank wrote
> On Jan 1, 2018 9:06 AM, "Thomas Esbensen" <

> esbensen@

> > wrote:Challenge: Convert attached csv-file into vectors for
> timestamps, power,and heart_rate data. The file originates from a FIT-file
> (from a fitnessdevice) converted via FitSDKRelease into a
> CSV-file.Problem: I am not able to generate an output via textscan that
> correspondsto the number of lines (rows) in the csv-file.Just to add onto
> the conversation, I had a friend trying to run a dataparsing script built
> for textscan in MATLAB and it wouldn't work in octave.The data file was a
> mess so I never got around to paring it down to aminimal, sharable example
> to post to the group.The symptom was that a portion of the text file would
> cause Octave toadvance farther than MATLAB.  I don't know if the culprit
> was textscan orfgetl, but octave would hit EOF before MATLAB and throw a
> parsing error.Some code stepping showed after some part of the file that
> octave's filelocation counter would jump to a much higher value than in
> MATLAB.I don't have either program in front of me to check your data, but
> doesthis at all match what you're seeing?I know there have been a few bug
> tracker reports about textscan. Can anyonecomment about likely paths to
> explore there?  I also remember seeingsomething about issues double
> counting EOL character's, maybe specificallyin windows?Sorry I can't be
> more helpful.

The file has many rows of different number of data; little wonder it is hard
to read.But csv2cell in the io package nowadays can do it in a breeze.I used
(after a bit of fiddling with the range, see below):Data = csv2cell
("2017-08-11-143641-ELEMNT BOLT 2779-2-0.csv", "A1:JZ2784");which gave me a
2784x62 array.However the results point to bugs in csv2cell, it should be
able to read the data with range "A1:DV2784"; in addition some clearly
numerical values aren't converted to a double value. I'll look into those
bugs.As to textscan, Dan did a lot of good work lately, I think the bugs you
implied have been fixed in the development branch.Philip

Sent from:

reply via email to

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