<?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: Programming problem on array in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879204#M206921</link>
    <description>&lt;P&gt;Note that i changed your undefined variable c in the definition of the moment to c.3. Hope this is what it should be.&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jun 2023 14:17:24 GMT</pubDate>
    <dc:creator>Werner_E</dc:creator>
    <dc:date>2023-06-03T14:17:24Z</dc:date>
    <item>
      <title>Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879196#M206916</link>
      <description>&lt;P&gt;I am trying to program a series of iteration in mathcad, and i can't seem to program the part that I needed to get a good result. Can someone help me proofread my program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my dependent variable is c3 = 1, 1.1, kd2 that will be programmed to 2 different set of rules,&amp;nbsp;&lt;/P&gt;&lt;P&gt;if c3&amp;lt;cbal , Fy and if c3&amp;gt;=cbal , (600(d-c3))/c3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My F(c3) and Mcr is not showing a result of array. I am confused where to put my index that will support my array function. Kindly help. Thank you.&lt;/P&gt;&lt;P&gt;&lt;FONT color="headerbuttontrackingcode"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 13:17:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879196#M206916</guid>
      <dc:creator>Teddy</dc:creator>
      <dc:date>2023-06-03T13:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879198#M206917</link>
      <description>&lt;P&gt;I am not sure what you are trying to achieve.&lt;/P&gt;
&lt;P&gt;If you expect a return vector of 2601 values, you could do it 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-1685799336580.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/83057i47643A9CBFE7B271/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_0-1685799336580.png" alt="Werner_E_0-1685799336580.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;No need to provide the local variable c.3 as function argument.&lt;/P&gt;
&lt;P&gt;But you let c.3 run up to kd.2=261 so the condition c.3&amp;lt;c.bal is always true and you get a vector with 2601 entries being all the same (F.y=275).&lt;/P&gt;
&lt;P&gt;Is this really what you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, here is an alternate way to create a vector F, this time not using a fix step of 0.1 for c.3 but the range from 1 to kd.2 is divided into N steps&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_1-1685799775708.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/83058i62C2F3BD6D3C1081/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_1-1685799775708.png" alt="Werner_E_1-1685799775708.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or was your intention to just define functions for further usage? Then M must be a function of c.3 as well&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_2-1685800551397.png" style="width: 587px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/83059i3E62A11F054725C7/image-dimensions/587x468?v=v2" width="587" height="468" role="button" title="Werner_E_2-1685800551397.png" alt="Werner_E_2-1685800551397.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 14:11:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879198#M206917</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-06-03T14:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879200#M206918</link>
      <description>&lt;P&gt;how do you put Result rows(Result)&amp;gt; is it (ctrl -)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, I wanted it to produce an array at my Mcr if the function goes otherwise.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 13:51:46 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879200#M206918</guid>
      <dc:creator>Teddy</dc:creator>
      <dc:date>2023-06-03T13:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879202#M206919</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/418115"&gt;@Teddy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;how do you put Result rows(Result)&amp;gt; is it (ctrl -)?&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No! Its a vector index ([). This is a convenient way but only works OK if ORIGIN is at its default value 0.&lt;/P&gt;
&lt;P&gt;The first time rows(R) returns 0 because R is not an array but a single scalar. So the first value is now saved in the first entry (#0) of the vector R.&lt;/P&gt;
&lt;P&gt;If ORIGIN is set to another value, you would have to use&amp;nbsp; R [ ORIGIN+rows(R) instead of just R [ rows(R)&lt;/P&gt;
&lt;P&gt;Nonetheless I would prefer the second method shown where you have more control over the number of entries in the vector and also can assure that the end value kd.2 is actually reached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, in your function/variable(?) M you used an undefined variable c (should it be c.3?). Prime uses its built-in constant c (speed of light) and so you get a unit mismatch error.&lt;/P&gt;
&lt;P&gt;Once you got your calcs to work it would be a good idea to modify it to use correct units - Prime is good at dealing with units and you should take advantage of it.&lt;/P&gt;
&lt;P&gt;In the meantime I had edited my post and attached the worksheet in Prime 6 format which seems to be the version you are using.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 14:14:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879202#M206919</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-06-03T14:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879203#M206920</link>
      <description>&lt;P&gt;Yes, this was my intention because I am trying to study how the program will affect my moment graph if I have a value greater than cbal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping me program my study.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 14:08:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879203#M206920</guid>
      <dc:creator>Teddy</dc:creator>
      <dc:date>2023-06-03T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Programming problem on array</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879204#M206921</link>
      <description>&lt;P&gt;Note that i changed your undefined variable c in the definition of the moment to c.3. Hope this is what it should be.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 14:17:24 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Programming-problem-on-array/m-p/879204#M206921</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-06-03T14:17:24Z</dc:date>
    </item>
  </channel>
</rss>

