I have an implementation that involves multiplying matrices, summing them up, and storing them. It goes like this,
A = 0;
A_i = load('A_i.mat');
y_i = A_i*(z_i + x);
A = A + A_i*A_i'
My problem is the large amount of simulation time being consumed by the above code. Even when the operations inside the loop are efficient (let's say ~0.01mins), the entire looped implementation still consumes about ~12-13mins. Can somebody please help me out and suggest an efficient way to do this? Thanks so much!