MATLAB: Multiplying Certain Elements in an array- Construct a matrix, s3, by multiplying the first 10 elements of s by 3

matrix

If i have a matrix s=[0:100]; how can i Construct a matrix, s3, by multiplying the first 10 elements of s by 3 ?????

Best Answer

s = 0:100 ;
s3 = s(1:10)*3 ;