maix00/StatisticsAnalysis

Fail to save high dimensional objects.

Closed this issue · 0 comments

function s = saveobj(obj)
s = struct;
if ~isempty(obj)
sizeInfo = size(obj);
s = [];
for indx2 = 1: 1: sizeInfo(2)
thisCol = [];
for indx1 = 1: 1: sizeInfo(1)
t = struct;
thisObj = obj(indx1, indx2);
t.bottom = thisObj.bottom;
t.top = thisObj.top;
t.intervalType = thisObj.intervalType;
t.unit = thisObj.unit;
t.duration = thisObj.duration;
t.scope = thisObj.scope;
thisCol = [thisCol; t];
end
s = [s, thisCol];
end
end
end