I find that I often create a cell array by writing code of this general format:
n = size(matrix, 1);cell_array = cell(n, 1);for i = 1:n cell_array{i} = function(matrix(i, :), other_variables);end
Is there a way to do this in one line, without a for loop?
Best Answer