<?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: Finding incremental values with a loop in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124322#M48860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, it has to be possible.&lt;/P&gt;&lt;P&gt;But you cannot expect a routine which is written for a scalar T to work for a vector T, as you did.&lt;/P&gt;&lt;P&gt;The easies way in my opinion would be to write an additional loop inside your program that cycles through all values of T. You would have to put the caclculations of all variables which depend on T inside this program loop.&lt;/P&gt;&lt;P&gt;That way you could return a 1560x1000 matrix, but if you are anly after the maximum I would rewrite the program to just remember the max after each iteration and return the max only.&lt;/P&gt;&lt;P&gt;Is there a reason you use square root of uuu^2 rather than the absolute value of uuu?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 14:17:39 GMT</pubDate>
    <dc:creator>Werner_E</dc:creator>
    <dc:date>2013-07-03T14:17:39Z</dc:date>
    <item>
      <title>Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124319#M48857</link>
      <description>Hi,I'm new to Mathcad and I've been struggling with a problem and wondered if someone could help. I'm using Mathcad to work out Response Spectra for particular ground motion.I'm running a loop of linear acceleration method to find the displacement from ground acceleration.</description>
      <pubDate>Thu, 03 May 2018 17:08:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124319#M48857</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2018-05-03T17:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124320#M48858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure from your description what you are trying to do, but the error in your sheet is thrown because you had set ORIGIN to be 1 but used vector index 0 in your program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 13:54:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124320#M48858</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T13:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124321#M48859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that, the reason I had done that was that I was encountering a problem when I tried to do the range from 1..50 then when the denominator was T it said couldn't divide by zero even though my range should have started from 1. Is there another way to get round this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realise it's not very clear so I'll try to explain slightly better...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can run the programme when I put T=1, which will give me the displacement at all 1600 points of which I only want the maximum absolute value. However, what I really want to do is to be able to write a programme that will allow me to get the max absolute value when T=0.02,0.04....20. Which would just give me the max abs value of displacement for each value of T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if that is possible at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, I really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:03:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124321#M48859</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2013-07-03T14:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124322#M48860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, it has to be possible.&lt;/P&gt;&lt;P&gt;But you cannot expect a routine which is written for a scalar T to work for a vector T, as you did.&lt;/P&gt;&lt;P&gt;The easies way in my opinion would be to write an additional loop inside your program that cycles through all values of T. You would have to put the caclculations of all variables which depend on T inside this program loop.&lt;/P&gt;&lt;P&gt;That way you could return a 1560x1000 matrix, but if you are anly after the maximum I would rewrite the program to just remember the max after each iteration and return the max only.&lt;/P&gt;&lt;P&gt;Is there a reason you use square root of uuu^2 rather than the absolute value of uuu?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:17:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124322#M48860</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T14:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124323#M48861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide a routine which calculates the displacements or the max displacement for a specific period T (which then should be a parameter of that function).&lt;/P&gt;&lt;P&gt;You wrote that your uuu routine does just that, but then I am unsure as of the role of your Delta_t (0.02) which seems to be the stepwidth of your range of periods and then should have nothing to do with the calculation for a single value T. As written now Delta_t influences the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:32:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124323#M48861</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T14:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124324#M48862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, I had tried to do use the absolute function from the calculator but it returned the wrong answer so I just did the root of the square.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for the tips, I'm going to start over I think and I'll let you know how I get on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:34:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124324#M48862</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2013-07-03T14:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124325#M48863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I've attached that there. The Delta_T is to compute variables for Newmark's method. Is that what you mean?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:40:25 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124325#M48863</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2013-07-03T14:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124326#M48864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This routine does not have T as parameter but still relies on values assigned and calculated outside of the program!&lt;/P&gt;&lt;P&gt;I see that Delta_t is the time step of the values in your matrix x and has nothing to do with the step of the range of periods. Is just the same value 0.02 by accident.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess its easy to do what you are after, but I have to know - do you need the whole vector u and later the whole big matrix with all the displacements for all periods or does it suffice if the routine returns the maximum only??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 15:09:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124326#M48864</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124327#M48865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I see where you are coming from now! Currently trying to rework it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, the only information that I need is the maximum and then I will plot displacement against T which will be intervals of 0.02s.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 15:29:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124327#M48865</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2013-07-03T15:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124328#M48866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Andrew MacLennan wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, I see where you are coming from now! Currently trying to rework it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, the only information that I need is the maximum and then I will plot displacement against T which will be intervals of 0.02s.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;?? So what data you would need for plotting?&lt;/P&gt;&lt;P&gt;Do you need the max_displacement for every T or the overall max?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of graph are you after? Plotting the 1560 displacement values for a/any given period T for a timerange of 31.2 sec OR plotting the 1000 max_displacements against the period values 0.02,0.04..20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;btw: You can get rid of most/all of the temp vectors you create in your program by simply omitting the index i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:22:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124328#M48866</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T16:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124329#M48867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just express the system as a second order ODE and then use Odesolve? It's very easy to make this a function of omega. See towards the bottom of the attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:24:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124329#M48867</guid>
      <dc:creator>AlanStevens</dc:creator>
      <dc:date>2013-07-03T16:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124330#M48868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much for all the help and suggestions. I actually stumbled upon something that was quite similar to what I was looking for and managed to adapt it. I've attached the way that I am working it now and it seems to be giving good results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan, thanks for the alternative method... I hadn't been aware that you could do that but it's really handy to know. I've gone with the original method as it was something that my uni lecturer wanted me to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again, I appreciate the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason I am not able to post an attachment now but I'll put the link to the previous discussion.&lt;A href="https://www.ptcusercommunity.com/thread/34623"&gt;Floating Point Errors&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 17:39:54 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124330#M48868</guid>
      <dc:creator>ptc-5169693</dc:creator>
      <dc:date>2013-07-03T17:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Finding incremental values with a loop</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124331#M48869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fine you got it to run.&lt;/P&gt;&lt;P&gt;With your iteration routine you get a floating point error, too, with period T=0.02 - idot and idotdot simply are getting too big and the calculation exceeds Mathcads limit. See attached for further details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 18:18:03 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Finding-incremental-values-with-a-loop/m-p/124331#M48869</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2013-07-03T18:18:03Z</dc:date>
    </item>
  </channel>
</rss>

