I found this piece of code on stackoverflow for displaying a fullscreen colour in MATLAB: Remove titlebar from MATLAB GUI for full screen display
The problem is that once I've run the program 5 times, there is an error that shows up:
??? Java exception occurred: java.lang.OutOfMemoryError: Java heap space" error that shows up.
Now, I could increase heap space like it is described here
But since my application has to run for long periods of time, is there a way I can clear the heapspace each time the script is run? In this way, I won't have to allocate more heapspace memory and have that run out eventually as well.