Fast way to save data
이전 댓글 표시
Hi,
I'm writing a matlab code that performs sensitivity analyses on a crop model. It composes data into a table and saves it as a text file. It then executes another application with that file as the input, and saves the output in an array. It repeats this process about a million times.
Currently, a million iterations takes about 5 days. Using the profiler, I identified the functions that take the most time (more than half the total execution time) are all functions used to save the data table as a text file. I was wondering if you guys had any tips on how to improve this to make the program faster?
Thanks!
답변 (2개)
Image Analyst
2014년 7월 22일
0 개 추천
Try saving as a binary file with fwrite(), or if the other application is also a MATLAB application, save to a .mat file.
Image Analyst
2014년 7월 22일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!