Are you looking to do a simple matrix multiply?
v = [1 0 0]
m = [0.3 0.2 0.5; 0.2 0.1 0.7; 0.1 0.5 0.4]
v = v * m
You can also do this in a loop.
If you want to square the matrix element by element
m = m.^2
but more likely you wish to square the matrix
m = m^2
You can do this for higher powers:
m = m^20
And putting it together:
>> v = v*m^20
v =
0.1652 0.3217 0.5130