Why does MATLAB slow down with time?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I am running a code, not so heavy I guess. Using a quad core processor. Clock speed 2.8GHz. 16GB RAM. Windows 10 64-bit OS. MATLAB version is slightly older (MATLAB 7.5.0 R2007b). I am not plotting any graphs. I have made sure that I clear all arrays before each loop begins. All I am doing in the code is to read through 1090 .csv files, sort the rows, and extract few top rows and write them in another Excel file in another folder. I am doing it in 14 'for' loops so I can get the Excel files as and when each of them gets ready. But I have observed that the execution time has increased from the time I had initially started to run my code. Any one who could give me tips to solve this?
0 Kommentare
Antworten (1)
Walter Roberson
am 17 Aug. 2018
Bearbeitet: Walter Roberson
am 17 Aug. 2018
As you are using Windows and an older version of MATLAB, we recommend that you switch from using xlswrite() to using the File Exchange contribution xlswrite1() which is more efficient. In some of the older releases around the time of yours, xlswrite() did not reliably release resources and so would slow down when it was called repeatedly.
If your code is repeatedly writing to the same file, then xlswrite1() will help, but better yet would be to create a cell array that you made all of the changes into and then only xlswrite1() the final version.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!