From: Oktay Arslan on
Dear all,

I am trying to write a handle class which its instances usually store too much information. I've defined a method which updates the content of the objects as needed. The class is basically as follows:

classdef myClass < handle

properties
data1;
data2;

massiveData;
end

methods
function obj = myClass(param)
obj.data1 = param.data1
obj.data2 = param.data2
end

function this = Update(this, param)
...
...
this.massiveData = param;
...
...
assignin('caller', inputname(1), this);
end

end

end

Execution of the Update method takes too much time order of 10 minutes. When I call Update method in debug mode, it executes every command very fast until the last command, it also executes 'assignin('caller', inputname(1), this);' very fast; but when the function tries to return, it spends too much time. I don't know what is happening there. Since my objects are very large bytes, I decided to define my class as handle class. Any help will be greatly appreciated.

Thanks