I guess this has been discussed before. I've just begun using the compiler fascility in MATLAB. I run MATLAB-code that models the elastic wave-equation. The main code is a loop, where ceratin variables are updated at each loop/iteration. I have declared all the variables that I use in the LOOP. My problem : When I call a function file during the loop, where I have to declare a three 4 byte integers, MATLAB seems allocate new space at every loop steps. I have to run through this loop many thousands times, so the amount of memory used get annoying. I've tried to use the clear-fascility, with no succes.
Is this a general problem with the MAT->C compiler ?? Any help on 'memory'-leaks in MATLAB are welcome