<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, sequence of matrices</title>
    <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Fri, 12 Jun 2026 01:35:38 GMT</lastBuildDate>
    <pubDate>Fri, 12 Jun 2026 01:35:38 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, sequence of matrices</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, sequence of matrices</title>
      <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices</link>
    </image>
    <item>
      <title>rtable_eval</title>
      <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices?ref=Feed:MaplePrimes:sequence of matrices:Comments#answer130443</link>
      <itunes:summary>&lt;p&gt;rtables (ie. Vector, Array, Matrix) evaluate differently. Partly, this is so that they don't get evaluated as full copies when passed as arguments to procedures (thus allowing efficiency, and also allowing inplace operations).&lt;/p&gt;
&lt;pre&gt;restart:

formula:=Vector([3*i]);
                              formula := [3 i]


seq(formula,i=4..7);
                         [3 i], [3 i], [3 i], [3 i]


seq(rtable_eval(formula),i=4..7);
                           [12], [15], [18], [21]
&lt;/pre&gt;
&lt;p&gt;And using the given example,&lt;/p&gt;
&lt;pre&gt;formula:=Vector(3, [3,y,11-4*y]);

                                       [   3    ]
                                       [        ]
                            formula := [   y    ]
                                       [        ]
                                       [11 - 4 y]


seq(formula,y=0..10);

  [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]  
  [        ]  [        ]  [        ]  [        ]  [        ]  [        ]  
  [   y    ], [   y    ], [   y    ], [   y    ], [   y    ], [   y    ], 
  [        ]  [        ]  [        ]  [        ]  [        ]  [        ]  
  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  

    [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]
    [        ]  [        ]  [        ]  [        ]  [        ]
    [   y    ], [   y    ], [   y    ], [   y    ], [   y    ]
    [        ]  [        ]  [        ]  [        ]  [        ]
    [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]


seq(rtable_eval(formula),y=0..10);

     [ 3]  [3]  [3]  [ 3]  [ 3]  [ 3]  [  3]  [  3]  [  3]  [  3]  [  3]
     [  ]  [ ]  [ ]  [  ]  [  ]  [  ]  [   ]  [   ]  [   ]  [   ]  [   ]
     [ 0], [1], [2], [ 3], [ 4], [ 5], [  6], [  7], [  8], [  9], [ 10]
     [  ]  [ ]  [ ]  [  ]  [  ]  [  ]  [   ]  [   ]  [   ]  [   ]  [   ]
     [11]  [7]  [3]  [-1]  [-5]  [-9]  [-13]  [-17]  [-21]  [-25]  [-29]
&lt;/pre&gt;
&lt;p&gt;You could also do it in a more usual manner by creating a procedure.&lt;/p&gt;
&lt;pre&gt;formula:=Vector(3, [3,y,11-4*y]):

func:=unapply(formula,:-y):
seq(func(y),y=0..10);
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;rtables (ie. Vector, Array, Matrix) evaluate differently. Partly, this is so that they don't get evaluated as full copies when passed as arguments to procedures (thus allowing efficiency, and also allowing inplace operations).&lt;/p&gt;
&lt;pre&gt;restart:

formula:=Vector([3*i]);
                              formula := [3 i]


seq(formula,i=4..7);
                         [3 i], [3 i], [3 i], [3 i]


seq(rtable_eval(formula),i=4..7);
                           [12], [15], [18], [21]
&lt;/pre&gt;
&lt;p&gt;And using the given example,&lt;/p&gt;
&lt;pre&gt;formula:=Vector(3, [3,y,11-4*y]);

                                       [   3    ]
                                       [        ]
                            formula := [   y    ]
                                       [        ]
                                       [11 - 4 y]


seq(formula,y=0..10);

  [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]  
  [        ]  [        ]  [        ]  [        ]  [        ]  [        ]  
  [   y    ], [   y    ], [   y    ], [   y    ], [   y    ], [   y    ], 
  [        ]  [        ]  [        ]  [        ]  [        ]  [        ]  
  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  

    [   3    ]  [   3    ]  [   3    ]  [   3    ]  [   3    ]
    [        ]  [        ]  [        ]  [        ]  [        ]
    [   y    ], [   y    ], [   y    ], [   y    ], [   y    ]
    [        ]  [        ]  [        ]  [        ]  [        ]
    [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]  [11 - 4 y]


seq(rtable_eval(formula),y=0..10);

     [ 3]  [3]  [3]  [ 3]  [ 3]  [ 3]  [  3]  [  3]  [  3]  [  3]  [  3]
     [  ]  [ ]  [ ]  [  ]  [  ]  [  ]  [   ]  [   ]  [   ]  [   ]  [   ]
     [ 0], [1], [2], [ 3], [ 4], [ 5], [  6], [  7], [  8], [  9], [ 10]
     [  ]  [ ]  [ ]  [  ]  [  ]  [  ]  [   ]  [   ]  [   ]  [   ]  [   ]
     [11]  [7]  [3]  [-1]  [-5]  [-9]  [-13]  [-17]  [-21]  [-25]  [-29]
&lt;/pre&gt;
&lt;p&gt;You could also do it in a more usual manner by creating a procedure.&lt;/p&gt;
&lt;pre&gt;formula:=Vector(3, [3,y,11-4*y]):

func:=unapply(formula,:-y):
seq(func(y),y=0..10);
&lt;/pre&gt;</description>
      <guid>130443</guid>
      <pubDate>Wed, 08 Feb 2012 00:31:26 Z</pubDate>
      <itunes:author>pagan</itunes:author>
      <author>pagan</author>
    </item>
    <item>
      <title>As function</title>
      <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices?ref=Feed:MaplePrimes:sequence of matrices:Comments#answer130447</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices#comment130442"&gt;@Jarekkk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A:=y-&amp;gt;&amp;lt;3, y, 11-4*y&amp;gt;: seq(A(y),y=0..10);&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices#comment130442"&gt;@Jarekkk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A:=y-&amp;gt;&amp;lt;3, y, 11-4*y&amp;gt;: seq(A(y),y=0..10);&lt;/p&gt;</description>
      <guid>130447</guid>
      <pubDate>Wed, 08 Feb 2012 01:05:54 Z</pubDate>
      <itunes:author>Kamel Boughrara</itunes:author>
      <author>Kamel Boughrara</author>
    </item>
    <item>
      <title>I see, thank you very much.</title>
      <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices?ref=Feed:MaplePrimes:sequence of matrices:Comments#comment130448</link>
      <itunes:summary>&lt;p&gt;I see, thank you very much.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I see, thank you very much.&lt;/p&gt;</description>
      <guid>130448</guid>
      <pubDate>Wed, 08 Feb 2012 01:08:32 Z</pubDate>
      <itunes:author>suitangi</itunes:author>
      <author>suitangi</author>
    </item>
    <item>
      <title>a comment</title>
      <link>http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices?ref=Feed:MaplePrimes:sequence of matrices:Comments#comment130542</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices#comment130448"&gt;@suitangi&lt;/a&gt;&amp;nbsp;I'd like to add a comment&lt;/p&gt;
&lt;p&gt;Even though evaluation of rtables is different from evaluation of lists and other expressions, when passed as arguments to procedures, access to individual rtable entries done inside procedures will still get a useful level of evaluation.&lt;/p&gt;
&lt;pre&gt;restart:
M:=Matrix([[s]]):

s:=77:

f:=proc(R) lprint(R); ToInert(R); end proc:

f(M); # f receives a M and not a fully evaluated copy of M

Matrix(1, 1, {(1, 1) = s}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])
_Inert_MATRIX(_Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(1)), 

  _Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(1)), _Inert_SET(_Inert_EXPSEQ(

  _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(1)), 

  _Inert_ASSIGNEDNAME("s", "INTPOS")))), _Inert_EQUATION(

  _Inert_NAME("datatype"), _Inert_NAME("anything", _Inert_ATTRIBUTE(

  _Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))), 

  _Inert_EQUATION(_Inert_NAME("storage"), _Inert_NAME("rectangular")), 

  _Inert_EQUATION(_Inert_ASSIGNEDNAME("order", "PROC", _Inert_ATTRIBUTE(

  _Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), 

  _Inert_NAME("Fortran_order")))

f:=proc(R) R[1,1]; end proc:

f(M); # access to entries of R get useful evaluation, nonetheless
                                     77


restart:
M:=[s]:  # a list!

s:=77:

f:=proc(R) dismantle(R); ToInert(R); end proc:

f(M); # 

LIST(2)
   EXPSEQ(2)
      INTPOS(2): 77


                _Inert_LIST(_Inert_EXPSEQ(_Inert_INTPOS(77)))
&lt;/pre&gt;
&lt;p&gt;So accessing individual entries of Matrix R (Matrix M) inside the procedure f gets the assigned value of s.&lt;/p&gt;
&lt;p&gt;It boils down to this question: how many entries of a Matrix will you want to access, inside f? If you want to access only a few, then it would be terrible for procedure performance if Maple had made the effort to fully evaluate all entries of Matrix argument R. Better to evaluate entries only on demand. The rtable_eval command provides finer grained control, in case this is not your scenario.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/130433-Sequence-Of-Matrices#comment130448"&gt;@suitangi&lt;/a&gt;&amp;nbsp;I'd like to add a comment&lt;/p&gt;
&lt;p&gt;Even though evaluation of rtables is different from evaluation of lists and other expressions, when passed as arguments to procedures, access to individual rtable entries done inside procedures will still get a useful level of evaluation.&lt;/p&gt;
&lt;pre&gt;restart:
M:=Matrix([[s]]):

s:=77:

f:=proc(R) lprint(R); ToInert(R); end proc:

f(M); # f receives a M and not a fully evaluated copy of M

Matrix(1, 1, {(1, 1) = s}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])
_Inert_MATRIX(_Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(1)), 

  _Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(1)), _Inert_SET(_Inert_EXPSEQ(

  _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(1)), 

  _Inert_ASSIGNEDNAME("s", "INTPOS")))), _Inert_EQUATION(

  _Inert_NAME("datatype"), _Inert_NAME("anything", _Inert_ATTRIBUTE(

  _Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))), 

  _Inert_EQUATION(_Inert_NAME("storage"), _Inert_NAME("rectangular")), 

  _Inert_EQUATION(_Inert_ASSIGNEDNAME("order", "PROC", _Inert_ATTRIBUTE(

  _Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), 

  _Inert_NAME("Fortran_order")))

f:=proc(R) R[1,1]; end proc:

f(M); # access to entries of R get useful evaluation, nonetheless
                                     77


restart:
M:=[s]:  # a list!

s:=77:

f:=proc(R) dismantle(R); ToInert(R); end proc:

f(M); # 

LIST(2)
   EXPSEQ(2)
      INTPOS(2): 77


                _Inert_LIST(_Inert_EXPSEQ(_Inert_INTPOS(77)))
&lt;/pre&gt;
&lt;p&gt;So accessing individual entries of Matrix R (Matrix M) inside the procedure f gets the assigned value of s.&lt;/p&gt;
&lt;p&gt;It boils down to this question: how many entries of a Matrix will you want to access, inside f? If you want to access only a few, then it would be terrible for procedure performance if Maple had made the effort to fully evaluate all entries of Matrix argument R. Better to evaluate entries only on demand. The rtable_eval command provides finer grained control, in case this is not your scenario.&lt;/p&gt;</description>
      <guid>130542</guid>
      <pubDate>Fri, 10 Feb 2012 09:31:51 Z</pubDate>
      <itunes:author>pagan</itunes:author>
      <author>pagan</author>
    </item>
  </channel>
</rss>