Hi everyboy
I am trying to vectorize the following code, but I can't. I want to calculate the matrix p_hat from the matrixs p and omega (these last matrix are of the same order) . The vector a is a function that gives me another index.
Could anyone help me, please?
for k=1:length(a) for j=1:length(a) if omega(j,k)==1 p_hat(k,a(j))=p(j,k); end endend
Best Answer