-- -*- M2-comint -*- {* hash: 1509896342 *}

i1 : L={3,5}

o1 = {3, 5}

o1 : List

i2 : mapleprogram="L:=placeholder1;returnvalue:=L[1]+L[2];";

i3 : callMaple(toString L,"",mapleprogram)

o3 = 8

i4 : A=matrix {{1,5,7},{7,13,5}}

o4 = | 1 5  7 |
     | 7 13 5 |

              2        3
o4 : Matrix ZZ  <--- ZZ

i5 : inputdata1=toString entries A

o5 = {{1, 5, 7}, {7, 13, 5}}

i6 : mapleprogram="with(linalg,ismith);A:=placeholder1;S:=ismith(A);returnvalue:=convert(S,listlist);";

i7 : matrix callMaple(inputdata1,"",mapleprogram)

o7 = | 1 0  0 |
     | 0 22 0 |

              2        3
o7 : Matrix ZZ  <--- ZZ

i8 : A=matrix {{1,5,7},{7,13,5}}

o8 = | 1 5  7 |
     | 7 13 5 |

              2        3
o8 : Matrix ZZ  <--- ZZ

i9 : inputdata1=toString entries A

o9 = {{1, 5, 7}, {7, 13, 5}}

i10 : inputdata2="ismith"

o10 = ismith

i11 : mapleprogram="with(linalg,placeholder2);A:=placeholder1;S:=placeholder2(A);returnvalue:=convert(S,listlist);";

i12 : matrix callMaple(inputdata1,inputdata2,mapleprogram)

o12 = | 1 0  0 |
      | 0 22 0 |

               2        3
o12 : Matrix ZZ  <--- ZZ

i13 : A=matrix {{1,5,7},{7,13,5}}

o13 = | 1 5  7 |
      | 7 13 5 |

               2        3
o13 : Matrix ZZ  <--- ZZ

i14 : inputdata1=toString entries A

o14 = {{1, 5, 7}, {7, 13, 5}}

i15 : inputdata2="ismith";

i16 : mapleprogram="with(linalg,placeholder2):A:=placeholder1;S:=placeholder2(A,U,V);returnvalue:=[convert(S,listlist),convert(U,listlist),convert(V,listlist)];";

i17 : L=callMaple(inputdata1,inputdata2,mapleprogram);

i18 : S=matrix L#0

o18 = | 1 0  0 |
      | 0 22 0 |

               2        3
o18 : Matrix ZZ  <--- ZZ

i19 : U=matrix L#1

o19 = | 1  0 |
      | -7 1 |

               2        2
o19 : Matrix ZZ  <--- ZZ

i20 : V=matrix L#2

o20 = | 1 5  3  |
      | 0 -1 -2 |
      | 0 0  1  |

               3        3
o20 : Matrix ZZ  <--- ZZ

i21 : U*A*V==S

o21 = true

i22 : 
