Given that we have a huge matrix called A and pass it to the func (A) function, where func
I perform a set of calculations, such as:
func(A):
B=A;
%% a lot of processes will happen on B here
return B;
end
The thing is, as soon as I pass A to B, I would have nothing to do with A in my Matlab session, so it takes up unnecessary memory space. Is it possible to delete its instance in the script area called func
?
source
share