Report question

Question: vectorize/optimize this code in MATLAB?