0
$\begingroup$

The matlab exercise states "Suppose now that you are playing the game with 100 coins (50 coins for each player to start) with a loaded dice such that the probability that the dice rolls to an even number is 0.53 instead of 0.5. (Recall you gain a coin on an even roll.) Write a for loop to create the transition matrix P and store this matrix as OneEmat" .

What is the loop supposed to to? How should I start the loop? How do I get a loop to create a matrix?

Any hints would be appreciated as I am quite loss on how to begin.

$\endgroup$
  • $\begingroup$ To make a transition matrix, loop over the rows (outer loop) and then over the columns (inner loop). $\endgroup$ – Hans Engler Mar 14 at 0:50
  • $\begingroup$ what do you mean by loop over the rows? $\endgroup$ – MCC Mar 14 at 1:48
  • $\begingroup$ for i = 1:n for j = 1:m A(i,j) = blablabla end end $\endgroup$ – Hans Engler Mar 14 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.