<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Computation with Array</title>
    <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 07:59:17 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 07:59:17 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Computation with Array</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Computation with Array</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array</link>
    </image>
    <item>
      <title>use ~ to force elementwise computations</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array?ref=Feed:MaplePrimes:Computation with Array:Comments#answer45204</link>
      <itunes:summary>&lt;p&gt;Maple 13 introduced enhanced functionality for elementwise computations. This is what you are looking for, I believe.&lt;/p&gt;
&lt;p&gt;Let's start with your original definitions:&lt;/p&gt;
&lt;pre&gt;
crossArea:= 3.2 * 19.1;
force := array ([0., 1380.0, 2780.0, 5630.0]);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 61.12
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ 0., 1380.0, 2780.0, 5630.0 ]
&lt;/pre&gt;
&lt;pre&gt;
You then computed:
&lt;img alt="" src="file:///C:/DOCUME~1/meade/LOCALS~1/Temp/moz-screenshot-11.png" /&gt;
engineeringStress := force/crossArea;
{0., 1380.0, 2780.0, 5630.0}/crossArea;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01636125654 force
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01636125654 {0., 1380.0, 2780.0, 5630.0}
&lt;/pre&gt;
&lt;p&gt;But, the division does not automatically get mapped elementwise to the entries in the array. To force this, use:&lt;/p&gt;
&lt;pre&gt;
engineeringStress := force/~crossArea;
{0., 1380.0, 2780.0, 5630.0}/~crossArea;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0., 22.57853403, 45.48429319, 92.11387435]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {0., 22.57853403, 45.48429319, 92.11387435}
&lt;/pre&gt;
&lt;p&gt;Does this solve your problem?&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade  &amp;lt;&amp;gt;&amp;lt;
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Maple 13 introduced enhanced functionality for elementwise computations. This is what you are looking for, I believe.&lt;/p&gt;
&lt;p&gt;Let's start with your original definitions:&lt;/p&gt;
&lt;pre&gt;
crossArea:= 3.2 * 19.1;
force := array ([0., 1380.0, 2780.0, 5630.0]);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 61.12
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ 0., 1380.0, 2780.0, 5630.0 ]
&lt;/pre&gt;
&lt;pre&gt;
You then computed:
&lt;img alt="" src="file:///C:/DOCUME~1/meade/LOCALS~1/Temp/moz-screenshot-11.png" /&gt;
engineeringStress := force/crossArea;
{0., 1380.0, 2780.0, 5630.0}/crossArea;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01636125654 force
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01636125654 {0., 1380.0, 2780.0, 5630.0}
&lt;/pre&gt;
&lt;p&gt;But, the division does not automatically get mapped elementwise to the entries in the array. To force this, use:&lt;/p&gt;
&lt;pre&gt;
engineeringStress := force/~crossArea;
{0., 1380.0, 2780.0, 5630.0}/~crossArea;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0., 22.57853403, 45.48429319, 92.11387435]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {0., 22.57853403, 45.48429319, 92.11387435}
&lt;/pre&gt;
&lt;p&gt;Does this solve your problem?&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade  &amp;lt;&amp;gt;&amp;lt;
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu
&lt;/pre&gt;</description>
      <guid>45204</guid>
      <pubDate>Thu, 04 Feb 2010 20:58:04 Z</pubDate>
      <itunes:author>Doug Meade</itunes:author>
      <author>Doug Meade</author>
    </item>
    <item>
      <title>Try Array</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array?ref=Feed:MaplePrimes:Computation with Array:Comments#answer45205</link>
      <itunes:summary>&lt;p&gt;Try changing your array to the newer Array structure.&lt;/p&gt;
&lt;p&gt;crossArea := 3.2*19.1; &lt;br /&gt;
force := Array([0., 1380.0, 2780.0, 5630.0]); &lt;br /&gt;
engineeringStress := force/crossArea; &lt;br /&gt;
engineeringStress[1].({0., 1380.0, 2780.0, 5630.0}/crossArea);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Scott&lt;br /&gt;
Application Developer&lt;br /&gt;
Maplesoft&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Try changing your array to the newer Array structure.&lt;/p&gt;
&lt;p&gt;crossArea := 3.2*19.1; &lt;br /&gt;
force := Array([0., 1380.0, 2780.0, 5630.0]); &lt;br /&gt;
engineeringStress := force/crossArea; &lt;br /&gt;
engineeringStress[1].({0., 1380.0, 2780.0, 5630.0}/crossArea);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Scott&lt;br /&gt;
Application Developer&lt;br /&gt;
Maplesoft&lt;/p&gt;</description>
      <guid>45205</guid>
      <pubDate>Thu, 04 Feb 2010 20:59:09 Z</pubDate>
      <itunes:author>Scott03</itunes:author>
      <author>Scott03</author>
    </item>
    <item>
      <title>Truly appreciate your help</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array?ref=Feed:MaplePrimes:Computation with Array:Comments#answer45208</link>
      <itunes:summary>Hi Doug, Scott, and Acer:

Thank you for all your answers; I've learned a lot from reading all the answers.  

~ -- to work with elmentwise work fine
Array -- work fine.


Side notes:  I had turned to MATLAB to get the answers quickly.  I find MATLAB is a little more "intuitive" when dealing with array, list, vector; by "intuitive" I mean that users will not need to 'think' about "element operations".  But I like the plotting features of Maple; I now come back to work on this problem using Maple.  

Thank you for your help.

--mdc</itunes:summary>
      <description>Hi Doug, Scott, and Acer:

Thank you for all your answers; I've learned a lot from reading all the answers.  

~ -- to work with elmentwise work fine
Array -- work fine.


Side notes:  I had turned to MATLAB to get the answers quickly.  I find MATLAB is a little more "intuitive" when dealing with array, list, vector; by "intuitive" I mean that users will not need to 'think' about "element operations".  But I like the plotting features of Maple; I now come back to work on this problem using Maple.  

Thank you for your help.

--mdc</description>
      <guid>45208</guid>
      <pubDate>Fri, 05 Feb 2010 22:16:03 Z</pubDate>
      <itunes:author>mdc</itunes:author>
      <author>mdc</author>
    </item>
    <item>
      <title>yes, but</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array?ref=Feed:MaplePrimes:Computation with Array:Comments#comment45206</link>
      <itunes:summary>&lt;p&gt;While changing array to Array is, generally, preferred and does help with the references to engineeringStress, it does not affect the responses when the input is a set (or list). For this you really do need to use the ~ form of division.&lt;/p&gt;
&lt;p&gt;In my previous post I should have included a link to the online help - see ?elementwise .&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade  &amp;lt;&amp;gt;&amp;lt;
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;While changing array to Array is, generally, preferred and does help with the references to engineeringStress, it does not affect the responses when the input is a set (or list). For this you really do need to use the ~ form of division.&lt;/p&gt;
&lt;p&gt;In my previous post I should have included a link to the online help - see ?elementwise .&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade  &amp;lt;&amp;gt;&amp;lt;
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu
&lt;/pre&gt;</description>
      <guid>45206</guid>
      <pubDate>Thu, 04 Feb 2010 21:04:42 Z</pubDate>
      <itunes:author>Doug Meade</itunes:author>
      <author>Doug Meade</author>
    </item>
    <item>
      <title>but..</title>
      <link>http://www.mapleprimes.com/questions/35810-Computation-With-Array?ref=Feed:MaplePrimes:Computation with Array:Comments#comment45207</link>
      <itunes:summary>&lt;p&gt;But one does not &amp;quot;need to use&amp;quot; &lt;b&gt;~&lt;/b&gt; to get the elementwise effect, on either a &lt;b&gt;set&lt;/b&gt; or an old-style locarcase &lt;b&gt;array&lt;/b&gt;. One can also use &lt;b&gt;map&lt;/b&gt;, which was available prior to Maple 13 (and would have been a usual way, for dealing with the &lt;b&gt;set&lt;/b&gt;).&lt;/p&gt;
&lt;p&gt;For a lowercase &lt;b&gt;array&lt;/b&gt; (when it was not deprecated) the &lt;b&gt;evalm&lt;/b&gt; command would have been a popular way to distribute scalar multiplication (along with effecting other arithmetic at the same time). And that still works, as does using &lt;b&gt;~&lt;/b&gt; or &lt;b&gt;map&lt;/b&gt;. But of course, as mentioned, with an newstyle Array or Matrix it happens automatically.&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;But one does not &amp;quot;need to use&amp;quot; &lt;b&gt;~&lt;/b&gt; to get the elementwise effect, on either a &lt;b&gt;set&lt;/b&gt; or an old-style locarcase &lt;b&gt;array&lt;/b&gt;. One can also use &lt;b&gt;map&lt;/b&gt;, which was available prior to Maple 13 (and would have been a usual way, for dealing with the &lt;b&gt;set&lt;/b&gt;).&lt;/p&gt;
&lt;p&gt;For a lowercase &lt;b&gt;array&lt;/b&gt; (when it was not deprecated) the &lt;b&gt;evalm&lt;/b&gt; command would have been a popular way to distribute scalar multiplication (along with effecting other arithmetic at the same time). And that still works, as does using &lt;b&gt;~&lt;/b&gt; or &lt;b&gt;map&lt;/b&gt;. But of course, as mentioned, with an newstyle Array or Matrix it happens automatically.&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>45207</guid>
      <pubDate>Fri, 05 Feb 2010 07:59:15 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
  </channel>
</rss>