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!