Just use a simple cell array:
function epoch = matrix_extractor(data_class,number_epochs)
data_class;
C = cell(1,number_epochs);
for k = 1:number_epochs
C{k} = data_class(:,:,k);
end
end
Note that writing this is a waste of time: just use num2cell or mat2cell.
Note that there is likely little point to this anyway: it would be simpler to just access the original data array using indexing, rather than splitting up and duplicating that data in memory. Splitting up data rarely makes processing data easier.
Best Answer