I would like to program the following difference equation.
Find numbers $v_{i,j}$ so that for $1\leq i\leq 4$, $0\leq j\leq 5$: $$ v_{i,j+1} = (0.1)v_{i+1,j} + (0.8)v_{i,j} + (0.1)v_{i-1,j} $$ In addition it satisfies the conditions, for $0\leq j\leq 5$: $$ v_{0,j} = (0.2)j \text{ and }v_{5,j} = 25 + (0.2)j$$ And finally, the condition, for $0\leq i\leq 5$: $$ v_{i,0} = i^2 $$
I made a picture of this grid, where $v_{i,j}$ is draw in the standard xy-plane.
The red points, is the information which is given to us. The intermediate grid is unknown, but we can determine it from the difference equation. The values of $v_{i,j}$ are draw in black numbers next to red points.
The tree in the middle is the visualization of the difference equation. The purple point is the weighed average of the three points below it with the numbers indicating how it is being averaged.
I would like to produce a grid $v_{i,j}$ in MatLab. Then plot it using the 'surf' command for the approximating surface.