Alternative for fopen and dlmwrite

2 ビュー (過去 30 日間)
Mahi Nazir
Mahi Nazir 2015 年 3 月 18 日
編集済み: Mahi Nazir 2015 年 3 月 19 日
I have a large number of small .out files to be written. There are several for loops going on. A snippet:
outputfile=sprintf('AF_w.r.t_Sensor%d,Target%d at (%d,%d) and RV lines at (%.1f) .out',Col,target,txc,ty,R(Row,Col));
fid=fopen(outputfile,'w'); .. ... ... ... dlmwrite(outputfile,intersection,'-append','delimiter','\t') ... ...
fopen in write mode allows me to open a file so I can rewrite new data, erasing the old one every time I run the program and dlmwrite allows me to write data...
There is a serious performance issue with this code... it takes several minutes for each fopen and dlmwrite to execute for the number of files I have (several thousand files). How can I improve the performance? Please advice..
These files are then later accessed by other programs. Is there a way where i may not use files and store somewhere else like matrices.... can they later be accessed by other programs... but i have named eah file with sprintf... how will i identify the matrix in case i am able to use that
Thanks Mahi

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by