Alternative for fopen and dlmwrite
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!