## 20 Reputation

6 years, 298 days

## Matrix Calculation...

Maple

Could you help me make this code work?

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Matrix.mw .

restart;
with(LinearAlgebra);
A := 8; B := 5;
q := .4; p := .2; r := 1-p-q;
dimP := A+B+1;
P := Matrix(dimP, dimP, [0\$dimP*dimP]);
P[1, 1] := 1; P[1, 2] := 0;
P[dimP, dimP] := 1; P[dimP, dimP-1] := 0;
for i from 2 to dimP-1 do P[i, i-1] := q; P[i, i] := r; P[i, i+1] := p end do;
p0 := Matrix(dimP, 1, [0\$dimP]);
p0[A+1, 1] := 1;
pV[0] := p0;
PT := Transpose(P);
for n to 200 do pV[n] := PT . pV[n-1] end do;
map(proc (x) options operator, arrow; evalf(x, 3) end proc, Transpose(pV[5]));

## Error, (in limit/mrv/limsimpl) too many ...

Maple

Could you help me fix this code?

 >
 >
 >
 >
 >
 >
 >
 >

## Converting the very old version codes to...

Maple

Could you help me converting this old version code to modern version code(Maple 2017)?

 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 > # change this part code to the modernversion
 >
 >
 >
 >
 >
 (2)
 >

## The result does not seem to terminate....

Maple

 >
 >
 >
 (1)
 >
 >

The result does not seem to terminate whem I use evalf([%]).  The result should be like this:

(1/8)hypergeom([1,3/2,3/2,3/2],[2,2,2],1), (1/16)hypergeom([1,3/2,3/2,3/2,3/2],[2,2,2,2],1),(1/32)hypergeom([1,3/2,3/2,3/2,3/2,3/2],[2,2,2,2,2],1), (1/64)hypergeom([1,3/2,3/2,3/2,3/2,3/2,3/2],[2,2,2,2,2,2],1)

## Transition Matrix...

Maple

The code is from the book(SDE). I think P.n := evalm( P.(n-1)&*P0) causes the problem. I have never seen this kind of the structure before ( I did some coding with C and Java). Could you explain that? P0, P1, P2,,,, using for n from 1 to 10. Is "." between P and n the dot (period)? Thank you in advance.

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >