Future value expression in value function iteration

Hello! I have the following expression to analyze: futval = sum((ones(nkap,1)*prob(j,:)).*v,2)
The part (ones(nkap,1)*prob(j,:)) produces an nkap by N matrix.
After that, there is an element by element multiplication by v,2
The matrix v is nkap by N.
This whole expression produces an nkap by 1 matrix.
My question is, what is the point of including ",2" after "v"? Is this a way to choose a particular dimension within the matrix v?

Answers (0)

Categories

Asked:

on 17 Jun 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!