<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: max(  ) works and min(  ) doesn't ? in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369550#M144619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - so it was still not as consequent as we would&amp;nbsp; like it to be, but at least the outcome did not depend on the first item of the vector.&lt;/P&gt;&lt;P&gt;BTW, in Mathcad 15 stdev returns NaN, which I consider a better way to deal with the NaN in the vector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jan 2017 12:59:51 GMT</pubDate>
    <dc:creator>Werner_E</dc:creator>
    <dc:date>2017-01-09T12:59:51Z</dc:date>
    <item>
      <title>max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369543#M144612</link>
      <description>&amp;nbsp; Hello, Everyone.&amp;nbsp; From :&amp;nbsp; So the question is : Is there a reason for : " max(&amp;nbsp; ) works and min(&amp;nbsp; ) doesn't " ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks in advance for your time and help.&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; Best Regards.</description>
      <pubDate>Thu, 03 May 2018 13:56:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369543#M144612</guid>
      <dc:creator>lvl107</dc:creator>
      <dc:date>2018-05-03T13:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369544#M144613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both, &lt;EM&gt;max&lt;/EM&gt; and &lt;EM&gt;min&lt;/EM&gt;, work OK the same way. NaN simply is interpreted as zero.&lt;/P&gt;&lt;P&gt;You may use &lt;EM&gt;filterNaN&lt;/EM&gt; to get what you expect:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/110547_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 09:31:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369544#M144613</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2017-01-08T09:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369545#M144614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;min works as expected as long as the first item in the vector is not NaN.&amp;nbsp; Also works ok if the first item is NaN and the minimum is less than zero. &lt;/P&gt;&lt;P&gt;max has the same problem if all the terms, other than NaN, are negative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 09:33:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369545#M144614</guid>
      <dc:creator>AlanStevens</dc:creator>
      <dc:date>2017-01-08T09:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369546#M144615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I did not realize that it depends on the first item in the vector.&lt;/P&gt;&lt;P&gt;Anyway, that behaviour sure is not as it should be and we may call it a bug.&lt;/P&gt;&lt;P&gt;But I am not sure how I would like min or max to behave. Normally in Mathcad, whenever a calculation encounters a NaN, it returns NaN as result. So for consistency &lt;EM&gt;min&lt;/EM&gt; and &lt;EM&gt;max&lt;/EM&gt; should return NaN in the examples above. On the other hand I guess it would not do any harm and would be convenient if those functions would simply ignore the NaN's - just like my filterNaN workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your information we can provide another workaround by simply putting + or - infinity at the front. But both workarounds will only work for vectors and must be modified slightly differently for row and column vectors.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/110551_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 11:49:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369546#M144615</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2017-01-08T11:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369547#M144616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on Alans observation concerning the first item in a vector here are some Min/Max replacement with one and two arguments which ignore NaN's and also can be used vectorized.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="110553" alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/110553_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 15:17:54 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369547#M144616</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2017-01-08T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369548#M144617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Many thanks, Werner and Alan. &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regards.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 17:36:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369548#M144617</guid>
      <dc:creator>lvl107</dc:creator>
      <dc:date>2017-01-08T17:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369549#M144618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For what it's worth: Mathcad 11.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/110575_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The error message for stdev is: "Encountered a floating point error.".&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 11:54:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369549#M144618</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2017-01-09T11:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369550#M144619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - so it was still not as consequent as we would&amp;nbsp; like it to be, but at least the outcome did not depend on the first item of the vector.&lt;/P&gt;&lt;P&gt;BTW, in Mathcad 15 stdev returns NaN, which I consider a better way to deal with the NaN in the vector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 12:59:51 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/369550#M144619</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2017-01-09T12:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: max(  ) works and min(  ) doesn't ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/1039314#M219187</link>
      <description>&lt;P&gt;I was searching for other threads that mentioned problems with the &lt;FONT face="book antiqua,palatino" color="#339966"&gt;&lt;STRONG&gt;min&lt;/STRONG&gt;&lt;/FONT&gt; function and found this thread.&amp;nbsp; Out of idle curiosity, I emulated the indicated "problem" in Mathcad Express 11.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025 10 21 B.png" style="width: 704px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/129952i5D6B3A5FCAA896A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025 10 21 B.png" alt="2025 10 21 B.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;filterNaN&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; is a Premium feature, I had to implement an Express version.&amp;nbsp; I chose to do this via a general &lt;FONT face="book antiqua,palatino" color="#000080"&gt;&lt;EM&gt;filter&lt;/EM&gt;&lt;/FONT&gt; function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025 10 21 C.png" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/129953iAC23E950E431FC91/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025 10 21 C.png" alt="2025 10 21 C.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which I then used to provide substitutes for &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;mean&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;var&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;stdev&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;min&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, and &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;max&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I chose to sort &lt;FONT face="book antiqua,palatino"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;NaN&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;s to the end of the sorted vector, as this seems to be the preferred method used by a number of other mathematical and general programming languages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025 10 21 D.png" style="width: 736px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/129954iF5971FFB4CDBBD58/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025 10 21 D.png" alt="2025 10 21 D.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 02:58:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/max-works-and-min-doesn-t/m-p/1039314#M219187</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2025-10-21T02:58:12Z</dc:date>
    </item>
  </channel>
</rss>

