From: jay jay on
Hi,

I have a csv file. I use csvread to read the file:
M=csvread('AAPL.csv');

I get the following error:
------------------------------------------------------------------
??? Error using ==> dlmread at 145
Mismatch between file and format string.
Trouble reading number from file (row 1, field 3) ==> :30:0

Error in ==> csvread at 52
m=dlmread(filename, ',', r, c);

Error in ==> main at 4
M=csvread('AAPL.csv');
-------------------------------------------------------------------
my file is in the following format:

20070620,09:30:00,123.85,200
20070620,09:30:00,123.84,100
20070620,09:30:00,123.9,203
20070620,09:30:00,123.88,157318

Can you help me. Much appreciated.
From: us on
"jay jay" <jay.oberoi(a)yahoo.com> wrote in message <i06nl1$cto$1(a)fred.mathworks.com>...
> Hi,
>
> I have a csv file. I use csvread to read the file:
> M=csvread('AAPL.csv');
>
> I get the following error:
> ------------------------------------------------------------------
> ??? Error using ==> dlmread at 145
> Mismatch between file and format string.
> Trouble reading number from file (row 1, field 3) ==> :30:0
>
> Error in ==> csvread at 52
> m=dlmread(filename, ',', r, c);
>
> Error in ==> main at 4
> M=csvread('AAPL.csv');
> -------------------------------------------------------------------
> my file is in the following format:
>
> 20070620,09:30:00,123.85,200
> 20070620,09:30:00,123.84,100
> 20070620,09:30:00,123.9,203
> 20070620,09:30:00,123.88,157318
>
> Can you help me. Much appreciated.

a hint:

help textread;
help textscan;

us
From: jay jay on
"us " <us(a)neurol.unizh.ch> wrote in message <i06r3h$k30$1(a)fred.mathworks.com>...
> "jay jay" <jay.oberoi(a)yahoo.com> wrote in message <i06nl1$cto$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I have a csv file. I use csvread to read the file:
> > M=csvread('AAPL.csv');
> >
> > I get the following error:
> > ------------------------------------------------------------------
> > ??? Error using ==> dlmread at 145
> > Mismatch between file and format string.
> > Trouble reading number from file (row 1, field 3) ==> :30:0
> >
> > Error in ==> csvread at 52
> > m=dlmread(filename, ',', r, c);
> >
> > Error in ==> main at 4
> > M=csvread('AAPL.csv');
> > -------------------------------------------------------------------
> > my file is in the following format:
> >
> > 20070620,09:30:00,123.85,200
> > 20070620,09:30:00,123.84,100
> > 20070620,09:30:00,123.9,203
> > 20070620,09:30:00,123.88,157318
> >
> > Can you help me. Much appreciated.
>
> a hint:
>
> help textread;
> help textscan;
>
> us

Great. Thanks!!