help-octave
[Top][All Lists]
Advanced

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

Re: Problems with reading csv (textscan)


From: Dmitri A. Sergatskov
Subject: Re: Problems with reading csv (textscan)
Date: Mon, 19 Aug 2019 12:29:01 -0500

On Mon, Aug 19, 2019 at 12:18 PM Dmitri A. Sergatskov
<address@hidden> wrote:
>
> > Thanks for the quick followup.  As I mentioned before, I also tried various 
> > combinations of options for textscan to see if it could pull in your data.  
> > playing around with delimiter,  MultipleDelimsAsOne, the format string, 
> > etc. and I wasn't able to get it to output all of the data. it would always 
> > grab the first date string, sometimes the first few %s and first %f, but 
> > just empty cells after the first %f.  Maybe someone better with formatted 
> > strings can see what's causing the problem.
>
> There is some trailing junk before the ";" :
> od -c Messungen1.csv | head
> 0000000                           2   0   1   9   -   0   8   -   1   6
> 0000020   -   1   0   :   2   7   :   2   8  \0   ;
> 0000040                                                           F   x
> 0000060       [   N   ]  \0   ;
> 0000100                                       -   3   .   6   9   8  \0
> 0000120   ;
> 0000140                   F   y       [   N   ]  \0   ;
> 0000160                                                           -   4
> 0000200   2   .   4   2   8  \0   ;
>
>
> Dmitri.
> --

After I delete \0 and junked the remaining empty lines (result is attached)
at the end of the file, your code works just fine.


Dmitri.
--

Attachment: t1.csv
Description: Text Data


reply via email to

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