I have a matrix, for example, "A", with size 5 * n, where "n" is a large number. I want to apply functions to the columns of "A", is
for loop the best solution?
To be specific, assume
A = randn(5, 10000); B = randn(5, 5000); ix = cell(ix_1, ix_2, ...);
and I want to do the following:
for i = 1:10000 A(:, i) = B(:, ix_i) * B(:, ix_i)' * A(:,i); end
Is there faster solution?