To avoid using too much memory (or breaking due to memory), is it a feasible approach to use "clearvars -except keepVariables" inside each function?
"keepVariables" would be, inside the function, what's returned by the function.
clearing variables memory
Best Answer