.csv to .mat

12 visualizzazioni (ultimi 30 giorni)
Andy
Andy il 24 Mar 2011
How do I convert .csv files into .mat files. Specifically to interchange new files into the scrips from Algorithmic Trading with MATLAB - 2010 (the webinar). I want to use other files instead of "Bund1min.mat"
Files and webinar:
(Algorithmic Trading with MATLAB - 2010 by Stuart Kozola 22 Nov 2010 (Updated 06 Dec 2010) Code covered by the BSD License Files from the November 18, 2010 webinar.)

Risposte (1)

Walter Roberson
Walter Roberson il 24 Mar 2011
csvread() can be used to load data from csv files. You can then save() the data to a .mat file.
  4 Commenti
Andy
Andy il 25 Mar 2011
Maybe it will help if I say step by step what I am trying to do. I download a intra day stock price history csv file from www.stockrageous.com I can either load it into excel to format(I think I have to do this because their is text and a time col. formatted w/ xx:xx) or can try to load the file directly to matlab. When I try to load it into matlab there are errors. I got the excel file to load in and then save as a .mat file when I format the excel file by not having a time col and removing the text headers.
What I want to do: stockrageous.com .csv file to .mat file so it can load through with the for mentioned code.
If anyone needs clarification let me know. Thanks for your help in advance
Walter Roberson
Walter Roberson il 25 Mar 2011
After you have done the load(), ask to output fieldnames(d) as perhaps the data is not stored in a field named 'data'.

Accedi per commentare.

Categorie

Scopri di più su Financial Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by