MATLAB: Normalize a row vector

normalize vector

i have a vector of size A = 1*128…. i wanted to normalize the vector to B, such that when i sum the new matrix B, i get its sum of all column values as 1….
is there any method to do it?… please do reply….

Best Answer

B = A./sum(A);