I'm trying to run a script on matlab_2011a, which calculate same means for a climatology of 50 years. When I started to run the script for all the years it worked fine until the iteration 20th, and then appeared the message:
Out of memory. Type HELP MEMORY for your options.
Then I used clear v1 v2 v3 ...
to clear all the variables inside the function, also i used clear train
because i saw it in another forum, and these with the modifications or not, I run again the script (since the 21th iteration), and the result is the same message, but curiously sometimes it run a year and then stop.
Any ideas about solving this problem?, what I have to clean to run correctly? (in this matlab version there's not the command memory which maybe could help me).
EDIT
Solution: There was a variable that was too large, saving the results differently prevented the out of memory error.