You need to leave i as a variable because it did not say to sum over i. So just sum over the j dimension for a given i.
norma2 = sqrt(sum(X(i, 1 : M) .^ 2));
No loops needed. Perhaps M is the number of columns, but it didn't say that explicitly so I'm just leaving it as M