You can try using the cumprod command which returns the cumulative product of the elements in a matrix or vector. For your example, something like:
K=cumprod([2 repmat(0.1,1,9)]); % returns a row vector of 9 elements
repmat just creates a row vector of nine elements each set to the value 0.1. The last element in the vector, K(end), will be the product returned by your example. i.e.K = 2*0.1^9;