Question: how to make a string like this using cat

Hello people in Mapleprimes,

 

I wish you to teach me about this.

From a matrix, I want to make a string.

 

pt3 := Matrix(4, 2, [1, 3, 4, 5, 6, 8, 5, 10]);

 

string1 := cat(

  "(", convert(pt3[1, 1], string), ",", convert(pt3[1, 2], string), ",", ")",

  "==",

  "(", convert(pt3[2, 1], string), ",", convert(pt3[2, 2], string), ",", ")",

  "==",

  "(", convert(pt3[3, 1], string), ",", convert(pt3[3, 2], string), ",", ")",

  "==",

  "(", convert(pt3[4, 1], string), ",", convert(pt3[4, 2], string), ")"

)

 

The above code makes 

string1 := "(1,3,)==(4,5,)==(6,8,)==(5,10)"

 

What I want to know is how to write a code of programming without writing each row of the above code.

Actually, though I wrote 4 row matrix above, the number of rows of matrix I want to deal with might be more than 100.

 

Best wishes.

 

taro

 

Please Wait...