Future value expression in value function iteration
Show older comments
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
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!