<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, How do I translate the following Mathematica code into Maple code?</title>
    <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica</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 04:00:35 GMT</lastBuildDate>
    <pubDate>Fri, 12 Jun 2026 04:00:35 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, How do I translate the following Mathematica code into Maple code?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, How do I translate the following Mathematica code into Maple code?</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica</link>
    </image>
    <item>
      <title>Explanation</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#answer123729</link>
      <itunes:summary>&lt;p&gt;&amp;nbsp;Mathematica 8.01 does not execute this code (see &lt;a href="/view.aspx?sf=123729/417014/Table.pdf"&gt;Table.pdf&lt;/a&gt;). In view of it, can you kindly explain your question in detail?&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;nbsp;Mathematica 8.01 does not execute this code (see &lt;a href="/view.aspx?sf=123729/417014/Table.pdf"&gt;Table.pdf&lt;/a&gt;). In view of it, can you kindly explain your question in detail?&lt;/p&gt;</description>
      <guid>123729</guid>
      <pubDate>Tue, 12 Jul 2011 09:00:36 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>Replica</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#answer123910</link>
      <itunes:summary>&lt;p&gt;How about this?&lt;/p&gt;
&lt;p&gt;&amp;gt; A := proc (t, cols) L := ListTools[Flatten](t): &lt;br&gt;if cols = 1 then [seq(seq([L[j+3*k]], k = 0 .. nops(t)), j = 1 .. 3)] &lt;br&gt;else [seq([seq(L[j+3*s-3], s = 1 .. cols)], j = 1 .. 3)] end if &lt;br&gt;end proc;&lt;br&gt;&lt;br&gt;Warning, `L` is implicitly declared local to procedure `A`&lt;br&gt;&amp;gt;t := [[.299, .587, .114, -.786], [-.299, -.587, .886, .263, 1.], [.701, -.587, -.114, .441],&lt;br&gt;&amp;nbsp;[.563, -.784, -916, -345]]:&lt;br&gt;&amp;gt; A(t, 4);&lt;br&gt;[[.299, -.786, .886, .701], [.587, -.299, .263, -.587], [.114, -.587, 1., -.114]]&lt;br&gt;&amp;gt;A(t,1);&lt;/p&gt;
&lt;p&gt;[[.299], [-.786], [.886], [.701], [.441], [.587],&lt;br&gt;&amp;nbsp;[-.299], [.263], [-.587], [.563], [.114], [-.587], [1.], [-.114], [-.784]]&lt;/p&gt;
&lt;p&gt;Compare with&lt;br&gt;Table[Partition[&lt;br&gt;&amp;nbsp; Take[Flatten[{{.299, .587, .114, -0.786}, {-.299, -.587, .886, .263,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.}, {.701, -.587, -.114, 0.441}, {0.563, -0.784, -916, -345}}], {k, 3*4, 3}], 1], {k, 1, &lt;br&gt;&amp;nbsp; 3}]&lt;br&gt;{{{0.299}, {-0.786}, {0.886}, {0.701}}, {{0.587}, {-0.299}, {0.263}, &lt;br&gt;{-0.587}}, {{0.114}, {-0.587}, {1.}, {-0.114}}}&lt;br&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay in my answer: it is summer time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit.&lt;/strong&gt; The output of A(t,1).&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;How about this?&lt;/p&gt;
&lt;p&gt;&amp;gt; A := proc (t, cols) L := ListTools[Flatten](t): &lt;br&gt;if cols = 1 then [seq(seq([L[j+3*k]], k = 0 .. nops(t)), j = 1 .. 3)] &lt;br&gt;else [seq([seq(L[j+3*s-3], s = 1 .. cols)], j = 1 .. 3)] end if &lt;br&gt;end proc;&lt;br&gt;&lt;br&gt;Warning, `L` is implicitly declared local to procedure `A`&lt;br&gt;&amp;gt;t := [[.299, .587, .114, -.786], [-.299, -.587, .886, .263, 1.], [.701, -.587, -.114, .441],&lt;br&gt;&amp;nbsp;[.563, -.784, -916, -345]]:&lt;br&gt;&amp;gt; A(t, 4);&lt;br&gt;[[.299, -.786, .886, .701], [.587, -.299, .263, -.587], [.114, -.587, 1., -.114]]&lt;br&gt;&amp;gt;A(t,1);&lt;/p&gt;
&lt;p&gt;[[.299], [-.786], [.886], [.701], [.441], [.587],&lt;br&gt;&amp;nbsp;[-.299], [.263], [-.587], [.563], [.114], [-.587], [1.], [-.114], [-.784]]&lt;/p&gt;
&lt;p&gt;Compare with&lt;br&gt;Table[Partition[&lt;br&gt;&amp;nbsp; Take[Flatten[{{.299, .587, .114, -0.786}, {-.299, -.587, .886, .263,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.}, {.701, -.587, -.114, 0.441}, {0.563, -0.784, -916, -345}}], {k, 3*4, 3}], 1], {k, 1, &lt;br&gt;&amp;nbsp; 3}]&lt;br&gt;{{{0.299}, {-0.786}, {0.886}, {0.701}}, {{0.587}, {-0.299}, {0.263}, &lt;br&gt;{-0.587}}, {{0.114}, {-0.587}, {1.}, {-0.114}}}&lt;br&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay in my answer: it is summer time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit.&lt;/strong&gt; The output of A(t,1).&lt;/p&gt;</description>
      <guid>123910</guid>
      <pubDate>Sun, 17 Jul 2011 15:43:16 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>Explanation</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#comment123731</link>
      <itunes:summary>&lt;p&gt;Yes, that is because the variables in the give line of code were not defined. &amp;nbsp;I am sorry. &amp;nbsp;The given code is a section of a very long module that I am translating. &amp;nbsp;It is the last line and I have everything translated up until this point. &amp;nbsp;"t" is any vector, &amp;nbsp;"cols" is positive integer, and "k" is the variable incremented in the loop of Mathematica's Table command.&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Yes, that is because the variables in the give line of code were not defined. &amp;nbsp;I am sorry. &amp;nbsp;The given code is a section of a very long module that I am translating. &amp;nbsp;It is the last line and I have everything translated up until this point. &amp;nbsp;"t" is any vector, &amp;nbsp;"cols" is positive integer, and "k" is the variable incremented in the loop of Mathematica's Table command.&amp;nbsp;&lt;/p&gt;</description>
      <guid>123731</guid>
      <pubDate>Tue, 12 Jul 2011 09:37:24 Z</pubDate>
      <itunes:author>kkharrod</itunes:author>
      <author>kkharrod</author>
    </item>
    <item>
      <title>Executable code</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#comment123732</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica#comment123731"&gt;@kkharrod&lt;/a&gt; If you give an executable code, then the question can be answered. In other case that is a philosophical question, not a Maple question.&lt;/p&gt;
&lt;p&gt;PS. Because you operate with lists, take look at&amp;nbsp; the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=ListTools' target='_new'&gt;?ListTools&lt;/a&gt; package.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica#comment123731"&gt;@kkharrod&lt;/a&gt; If you give an executable code, then the question can be answered. In other case that is a philosophical question, not a Maple question.&lt;/p&gt;
&lt;p&gt;PS. Because you operate with lists, take look at&amp;nbsp; the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=ListTools' target='_new'&gt;?ListTools&lt;/a&gt; package.&lt;/p&gt;</description>
      <guid>123732</guid>
      <pubDate>Tue, 12 Jul 2011 09:43:19 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>Executable Code</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#comment123733</link>
      <itunes:summary>&lt;p&gt;The entire module that I am trying to translate appears in the attached notebook. I having difficulties in the last return statement. &amp;nbsp;&amp;nbsp;&lt;a href="/view.aspx?sf=123733/417023/RGBToYCbCr.pdf"&gt;RGBToYCbCr.pdf&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="/view.aspx?sf=123733/417332/RGBToYCbCr.txt"&gt;RGBToYCbCr.txt&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The entire module that I am trying to translate appears in the attached notebook. I having difficulties in the last return statement. &amp;nbsp;&amp;nbsp;&lt;a href="/view.aspx?sf=123733/417023/RGBToYCbCr.pdf"&gt;RGBToYCbCr.pdf&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="/view.aspx?sf=123733/417332/RGBToYCbCr.txt"&gt;RGBToYCbCr.txt&lt;/a&gt;&lt;/p&gt;</description>
      <guid>123733</guid>
      <pubDate>Tue, 12 Jul 2011 10:44:27 Z</pubDate>
      <itunes:author>kkharrod</itunes:author>
      <author>kkharrod</author>
    </item>
    <item>
      <title>.rar file</title>
      <link>http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica?ref=Feed:MaplePrimes:How do I translate the following Mathematica code into Maple code?:Comments#comment123734</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica#comment123733"&gt;@kkharrod&lt;/a&gt; Can you present this .nb as a .rar file to avoid typing?&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/123723-How-Do-I-Translate-The-Following-Mathematica#comment123733"&gt;@kkharrod&lt;/a&gt; Can you present this .nb as a .rar file to avoid typing?&lt;/p&gt;</description>
      <guid>123734</guid>
      <pubDate>Tue, 12 Jul 2011 11:13:16 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
  </channel>
</rss>