- #1
Schwarzschild90
- 113
- 1
Homework Statement
I ask for help in solving the exercises in this project on applied linear algebra. The problem outlined in the project is one in which we are tasked with modeling the demise of a gambler.
I need help solving exercise 1 (in red) on page 6. I have pasted the exercise text into the text body below, in block quotes.
Using the equations discussed above, evaluate numerically U(l) as a function of the initial gambler position l. Use e.g. M = 100 or similar. This is the code that I have written
M = 100;
X = ones(M,1); A = diag(-2*X,0); clear X X = ones(M-1,1); B = diag(X,1); C = diag(X,-1); T = A+B+C;
tau = 1; N = -(inv(T)/tau)*n0 n0 = eye;
numeric::int(N, l = 0..infinity)