in .* and .^, "." -- dot means compute elements, one by one. "^2" means squaring
plus one for all elements in a vector
another way to do this
trans the matrix by '
the 3rd param is which dimension you want to find the max. 1 means max of each column. 2 means max of each row.
max(A) is same as max(A,,1]
if you want to find max elements in this matrix then you need to call max 2 times:
or max(A(:)) A(:) will make all of them into a vector
sum(A,2) will sum each row.