<?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: While loop problem with indexes in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868324#M206090</link>
    <description>&lt;P&gt;At first you should use the number &amp;gt;= i in your program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 127px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/79935i9D17EA8090C57830/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 156px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/79936i03E56A364E8EF750/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>Wed, 12 Apr 2023 08:55:37 GMT</pubDate>
    <dc:creator>ttokoro</dc:creator>
    <dc:date>2023-04-12T08:55:37Z</dc:date>
    <item>
      <title>While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868310#M206089</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, help me before I lose my mind finally. I have this simple while loop which is working just fine most of the cases but not now. I understand that the problem is with indexes but I just cannot see the solution. Please find the example file attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I'm trying to do is to compare the arrays xf and hs. Please see also the attached picture. I would want to get points compared and sorted like in the picture. From smallest to largest. English is not my native so I thought the picture would be more than thousand words.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feel free also to suggest more simple way to do this if you like. Bear in mind that the dimensions and number of "i" usually changes with different cases I have. But one thing doesn't change and it's the number of equally divided spaces = 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your advice in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Harri&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 07:58:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868310#M206089</guid>
      <dc:creator>HS_10137076</dc:creator>
      <dc:date>2023-04-12T07:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868324#M206090</link>
      <description>&lt;P&gt;At first you should use the number &amp;gt;= i in your program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 127px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/79935i9D17EA8090C57830/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 156px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/79936i03E56A364E8EF750/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>Wed, 12 Apr 2023 08:55:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868324#M206090</guid>
      <dc:creator>ttokoro</dc:creator>
      <dc:date>2023-04-12T08:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868401#M206097</link>
      <description>&lt;P&gt;Its sure bad habit to use the same name for the sum index and its end value, as ttokoro already remarked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have not looked at your program in detail but provide a solution depending of how I understood what you actually are after.&lt;BR /&gt;I prefer using small utility functions which do just one task and combine them to get what is needed.&lt;/P&gt;
&lt;P&gt;See if the following (Prime 9 file attached) helps&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1681305109693.png" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/79957i3C3C5144B2C88623/image-size/large?v=v2&amp;amp;px=999" role="button" title="Werner_E_0-1681305109693.png" alt="Werner_E_0-1681305109693.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 14:03:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868401#M206097</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-04-12T14:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868439#M206102</link>
      <description>&lt;P&gt;Werner's file converted to Prime 8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 14:34:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868439#M206102</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2023-04-12T14:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868551#M206110</link>
      <description>&lt;P&gt;Thank you Werner! I would say your solution is "little" more simple and therefore better than mine &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;. I get that it's easier to check and control the calculations if the functions are done like you have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find also the file in where I managed to fix the problem also. I added some restrictions more to indexes and now it seems to work at least with those variables. But I will change my functions to match your examples.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 06:06:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868551#M206110</guid>
      <dc:creator>HS_10137076</dc:creator>
      <dc:date>2023-04-13T06:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: While loop problem with indexes</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868578#M206111</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 735px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/80009i478D72EF1E198C11/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, 13 Apr 2023 08:41:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/While-loop-problem-with-indexes/m-p/868578#M206111</guid>
      <dc:creator>ttokoro</dc:creator>
      <dc:date>2023-04-13T08:41:55Z</dc:date>
    </item>
  </channel>
</rss>

