How do I append data to an existing datafile? I don't want to overwrite any data, just simply add to it - is there a specific append or concat function i can use?

3 ビュー (過去 30 日間)
I have a data file with several arrays of financial data, prices, interest rates, etc on 43 different stocks, i'd like to add more data so that the data is up to date. Is there any way to append more data to the end of my current data file?
  1 件のコメント
mich
mich 2016 年 9 月 27 日
Let me give more information as I wrote the question way too briefly. I currently have a data.mat file which I use for an analytical model. In the data.mat file, I have several arrays of data such as spot prices, fwd prices, volatilities, and spreads. Many of the arrays are 3-d or 4-d double arrays, and line up against a specific day, that ended at the beginning of the year. I'm trying to figure out the best way to update my entire data set and am looking for tips on how to start out by appending (or concating) the simpler arrays before looking to do the same for the multi dimensional arrays.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 9 月 27 日
  3 件のコメント
mich
mich 2016 年 9 月 27 日
Thanks Walter, would that be the best way to also update 4-D and 5-D double arrays?
Walter Roberson
Walter Roberson 2016 年 9 月 27 日
matFile handles multidimensional arrays.

サインインしてコメントする。

その他の回答 (1 件)

dpb
dpb 2016 年 9 月 27 日
In what form does this file exist? In general, for text files you can use fopen w/ the append mode switch but you'll have to be somewhat careful in how you write new data; if the data are stored as a record per data point then you can add more pretty easily but if there are simply arrays of the various variables written, then it'll be more difficult to keep "who's who in the zoo" straight when you get ready to read the amended file later on.
In short, "not enough information" to answer fully...

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by