Reading data from CSV files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading data from CSV files

babelproofreader
I have tried to used the dlmread function to read a comma separated file of stock/commodity prices consisting of date (of the form 21/01/2008), open, high, low and close prices in columns. The prices are being read OK but the date column is being read as a number (e.g. 21.000000). Is there any way I can make the dlmread function read the date column as a date, or alternatively is there anyway I can replace the number with the correct date after the dlmread function has run?
Reply | Threaded
Open this post in threaded view
|

Re: Reading data from CSV files

Bill Denney-5
babelproofreader wrote:
> I have tried to used the dlmread function to read a comma separated file of
> stock/commodity prices consisting of date (of the form 21/01/2008), open,
> high, low and close prices in columns. The prices are being read OK but the
> date column is being read as a number (e.g. 21.000000). Is there any way I
> can make the dlmread function read the date column as a date, or
> alternatively is there anyway I can replace the number with the correct date
> after the dlmread function has run?
>  
Hi,

If you look at the financial package, you can get stock data from either
google or yahoo.  I think that I had to do special manipulations to the
google date to read it correctly, so you may want to look into those
functions for an example of how to do this.

Have a good day,

Bill
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave