Hey guys, i need your help.
I want to compare the runtime of pre-allocation and built-in matrix/vector operations in comparison to using loops and no pre-allocation.
mu = 2;
SD = 3;
m = 1000;
n = 100000;
random_matrix = randn(m,n)*SD + mu;
means = mean(random_matrix);
SDs = std(random_matrix);
zscored = (random_matrix - means) ./ SDs;
The build in matrix multiplication 1) was easy, i am struggeling at 2) and 3), do you know how to do it? thanks