<?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: if function in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951102#M211962</link>
    <description>&lt;P&gt;Try using the boolean equal&amp;nbsp;instead of the left arrow&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fred_Kohlhepp_0-1716289047548.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104694i9371DBD1B57D1387/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fred_Kohlhepp_0-1716289047548.png" alt="Fred_Kohlhepp_0-1716289047548.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 10:58:40 GMT</pubDate>
    <dc:creator>Fred_Kohlhepp</dc:creator>
    <dc:date>2024-05-21T10:58:40Z</dc:date>
    <item>
      <title>if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951072#M211959</link>
      <description>&lt;P&gt;How to solve this problem&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YA_10963798_0-1716286079159.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104677i9950481698FD64A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YA_10963798_0-1716286079159.png" alt="YA_10963798_0-1716286079159.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 10:08:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951072#M211959</guid>
      <dc:creator>YA_10963798</dc:creator>
      <dc:date>2024-05-21T10:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951102#M211962</link>
      <description>&lt;P&gt;Try using the boolean equal&amp;nbsp;instead of the left arrow&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fred_Kohlhepp_0-1716289047548.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104694i9371DBD1B57D1387/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fred_Kohlhepp_0-1716289047548.png" alt="Fred_Kohlhepp_0-1716289047548.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 10:58:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951102#M211962</guid>
      <dc:creator>Fred_Kohlhepp</dc:creator>
      <dc:date>2024-05-21T10:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951106#M211963</link>
      <description>&lt;P&gt;Always post your sheet, not just pictures!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace the local assignment operator by a boolean equal.&lt;/P&gt;
&lt;P&gt;Furthermore your program does not consider the case when soil_type is neither "z" nor "k".&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:03:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951106#M211963</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-05-21T11:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951108#M211964</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YA_10963798_0-1716289371345.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104695iA2196CAEB27CF68F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YA_10963798_0-1716289371345.png" alt="YA_10963798_0-1716289371345.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;didn't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:03:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951108#M211964</guid>
      <dc:creator>YA_10963798</dc:creator>
      <dc:date>2024-05-21T11:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951110#M211965</link>
      <description>&lt;P&gt;Maybe your soil_type vector does not contain any "z" or "k".&lt;/P&gt;
&lt;P&gt;Again: &lt;STRONG&gt;Post your sheet!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We can't see how your variables are defined, what value(s) they contain.&lt;/P&gt;
&lt;P&gt;We don't see how the variables are labelled&lt;/P&gt;
&lt;P&gt;We don't see if you are using matrix indices or literal indices&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:09:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951110#M211965</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-05-21T11:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951114#M211966</link>
      <description>&lt;P&gt;I did the sheet is attached&lt;/P&gt;&lt;P&gt;can you also help in this error as well&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YA_10963798_0-1716289714613.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104699i8F4E2E83DFC2ED8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YA_10963798_0-1716289714613.png" alt="YA_10963798_0-1716289714613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:08:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951114#M211966</guid>
      <dc:creator>YA_10963798</dc:creator>
      <dc:date>2024-05-21T11:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951124#M211967</link>
      <description>&lt;P&gt;Main error in the initial question about the if-statement is your use of the for-loop. It requires a start and a stop value if you want it to loop and not only use one single value:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_1-1716290386117.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104702iE4DA7EB505FB2C16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_1-1716290386117.png" alt="Werner_E_1-1716290386117.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also deleted the elseif statement and replaced it by a simple else. Now the program considers every eventuality as every value in soil_type which is not "z" is treated as a "k".&lt;/P&gt;
&lt;P&gt;Primes help is not that clear and you may have to look at not so obvious examples or the video. The key is that y is supposed to be a range, not a scalar:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_4-1716290971981.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104706i822E1726754F6AF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_4-1716290971981.png" alt="Werner_E_4-1716290971981.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Considering your second problem in calculating Re, the reason is that the vector which you use in the nominator contains a zero as its first entry. This would force Prime to take the natural log of zero which of course it refuses to do!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_2-1716290708801.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104703i72E1B1121043F618/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_2-1716290708801.png" alt="Werner_E_2-1716290708801.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thats the reason for the error message you get&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_3-1716290749622.png" style="width: 233px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104704iABE6AFA48C986A62/image-dimensions/233x161?v=v2" width="233" height="161" role="button" title="Werner_E_3-1716290749622.png" alt="Werner_E_3-1716290749622.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:29:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951124#M211967</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-05-21T11:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951127#M211968</link>
      <description>&lt;P&gt;I tried to start the calculation from scond value , but still didn't work&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YA_10963798_0-1716290917951.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104705i11769B74207E5DCF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YA_10963798_0-1716290917951.png" alt="YA_10963798_0-1716290917951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:28:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951127#M211968</guid>
      <dc:creator>YA_10963798</dc:creator>
      <dc:date>2024-05-21T11:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951132#M211969</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/800166"&gt;@YA_10963798&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tried to start the calculation from scond value , but still didn't work&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, you didn't. You can't use a range n that way.&lt;/P&gt;
&lt;P&gt;At least three options:&lt;/P&gt;
&lt;P&gt;1) Use the vector index n on the left hand side at Re, too, and also on the vector in the denominator&lt;/P&gt;
&lt;P&gt;2) use the submatrix command to cut off the first value in both vectors and use these new vectors in your formula.&lt;/P&gt;
&lt;P&gt;3) redefine the ln function using try...on error ... to return a value (maybe a NaN) in case the original ln function fails.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: BTW, multiplying with 100% does not make much sense because &lt;FONT face="comic sans ms,sans-serif"&gt;100% = 1&lt;/FONT&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:01:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951132#M211969</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-05-21T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: if function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951152#M211970</link>
      <description>&lt;P&gt;If adding&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ttokoro_0-1716295217326.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104715i7B0322764121C89C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ttokoro_0-1716295217326.png" alt="ttokoro_0-1716295217326.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You get this result.&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="image.png" style="width: 535px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104713iFD4D6CF77057FFDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 473px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/104714iBBDB55CCC72B5405/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>Tue, 21 May 2024 12:41:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/if-function/m-p/951152#M211970</guid>
      <dc:creator>ttokoro</dc:creator>
      <dc:date>2024-05-21T12:41:18Z</dc:date>
    </item>
  </channel>
</rss>

