<?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: sum and conditions of values ​​of a vector and in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042044#M219486</link>
    <description>&lt;P&gt;I've only got Mathcad Express, so I can't do programming, but the attached Express worksheet outlines one possible method of doing what (I think) you want.&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="2020 04 05 B.png" style="width: 876px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130730i27D099CB6685C848/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020 04 05 B.png" alt="2020 04 05 B.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A programmed version should be much simpler.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stuart&lt;/P&gt;</description>
    <pubDate>Wed, 05 Nov 2025 23:39:52 GMT</pubDate>
    <dc:creator>StuartBruff</dc:creator>
    <dc:date>2025-11-05T23:39:52Z</dc:date>
    <item>
      <title>sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042035#M219485</link>
      <description>&lt;P&gt;Hello community, I have this problem:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;"How could I program it to sum 3 consecutive values in a vector (m), with the condition that the sum is performed only when there are exactly 3 consecutive values; otherwise, the result should be an empty string ('')."&lt;/LI&gt;&lt;LI&gt;"What I’m trying to do here is: in vector (a), if there is even one false, the result should be false; but if all values are true, the result should be true."&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DC_11916766_0-1762383073255.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130725i8ADB031618550EC5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DC_11916766_0-1762383073255.png" alt="DC_11916766_0-1762383073255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 22:51:24 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042035#M219485</guid>
      <dc:creator>DC_11916766</dc:creator>
      <dc:date>2025-11-05T22:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042044#M219486</link>
      <description>&lt;P&gt;I've only got Mathcad Express, so I can't do programming, but the attached Express worksheet outlines one possible method of doing what (I think) you want.&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="2020 04 05 B.png" style="width: 876px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130730i27D099CB6685C848/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020 04 05 B.png" alt="2020 04 05 B.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A programmed version should be much simpler.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 23:39:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042044#M219486</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2025-11-05T23:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042048#M219487</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 919px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130731i6AA7E237DCDAC9C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 868px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130733iAC18F65D20788122/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 00:17:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042048#M219487</guid>
      <dc:creator>ttokoro</dc:creator>
      <dc:date>2025-11-06T00:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042053#M219489</link>
      <description>&lt;P&gt;Its absolutely unclear to me what your Exercise 1 should be all about and what your cases I and II should demonstrate.&lt;/P&gt;
&lt;P&gt;In your vector m you don't have "exactly 3 consecutive" values because you have exactly seven consecutive values.&lt;/P&gt;
&lt;P&gt;So what should the result of vector m be and how does it relate to the two "cases" you show????&lt;/P&gt;
&lt;P&gt;As you can see, Stuart and Tetsuro interpreted your description differently, and neither of them would arrive at the vectors you specified as X and Y.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According your Exercise 2 I understand it in the sense that a vector which consist only of strings "True" and/or "" only should return "True" and if the vector contains just one other element (for example a string like "TRUE" or "true " or "False" or " ") the result should be "False.&lt;/P&gt;
&lt;P&gt;This could be done that way:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1762388990595.png" style="width: 700px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130734i4B17BC8B7D2558B5/image-dimensions/700x372?v=v2" width="700" height="372" role="button" title="Werner_E_0-1762388990595.png" alt="Werner_E_0-1762388990595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that this corresponds to Tetsuro's second version - everything which is not a "True" or an empty string&amp;nbsp; "" triggers the result "False".&lt;/P&gt;
&lt;P&gt;His first version on the other hand means that only a "False" triggers the result "False", everything else is allowed and returns a "True".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 00:35:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042053#M219489</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2025-11-06T00:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042057#M219490</link>
      <description>&lt;P&gt;I knew something was bugging me.&amp;nbsp; Clearly my subconscious knew what when I wrote "slide function f".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the convolution operators with an appropriate kernel.&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 11 06 A.png" style="width: 819px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130735iAD4A926B0CB3FC67/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025 11 06 A.png" alt="2025 11 06 A.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The operators themselves and the Diff function should give sufficient information to write a function that will vectorize over the vector and its convolution to give what's required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 00:46:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042057#M219490</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2025-11-06T00:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum and conditions of values ​​of a vector and</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042066#M219491</link>
      <description>&lt;P&gt;Unfortunately, I'm allergic to something at the moment and struggling to see, so, mea culpa, I didn't get as far as downloading the OP's worksheet and looking at the second example.&amp;nbsp; So, in partial atonement ...&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 11 06 C.png" style="width: 709px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/130737i6C7EB4EC585268B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025 11 06 C.png" alt="2025 11 06 C.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wasn't sure, upon reading it, what "all true" meant, since some of the values are just empty strings, but Soln_1 is true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I defined a predicate function "all.x?" that checks for all one value or a set of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 01:56:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/sum-and-conditions-of-values-of-a-vector-and/m-p/1042066#M219491</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2025-11-06T01:56:50Z</dc:date>
    </item>
  </channel>
</rss>

