Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
To community:
The attached worksheet shows two programs.
The one on the left shows one way of repeating a calculation that works and accomplishes what it is supposed to do.
The one on the right is an attempt to0 do the same by iterating the calculations but only goes into a recursive mode.
Would like help in the proper programming procedure.
Thanks for any help
Solved! Go to Solution.
StuartBruff wrote:
Do you want the function to stack the values at the end of each iteration, as they do in GU3epm? Or do you want some other behaviour?
Does this function fulfil a specific purpose, or is it a programming exercise/play-ground to try out various techniques?
One other thing, after another look at your function GU4epm, you need to move the initialization of s to before the while loop, otherwise the s:=s+1 expression is pretty useless as s gets reset next time round the loop.
Stuart
If stacking is needed, will something like this do what you want?
Stuart
Richard Cunningham wrote:
To community:
The attached worksheet shows two programs.
The one on the left shows one way of repeating a calculation that works and accomplishes what it is supposed to do.
The one on the right is an attempt to0 do the same by iterating the calculations but only goes into a recursive mode.
Would like help in the proper programming procedure.
You need to move the expression incrementing t into the while loop.
As an aside, it's just infinitely iterating rather than recursing (in computer terms) because nothing is calling itself.
Stuart
Richard Cunningham wrote:
To community:
The attached worksheet shows two programs.
The one on the left shows one way of repeating a calculation that works and accomplishes what it is supposed to do.
The one on the right is an attempt to0 do the same by iterating the calculations but only goes into a recursive mode.
Would like help in the proper programming procedure.
Do you want the function to stack the values at the end of each iteration, as they do in GU3epm? Or do you want some other behaviour?
Does this function fulfil a specific purpose, or is it a programming exercise/play-ground to try out various techniques?
One other thing, after another look at your function GU4epm, you need to move the initialization of s to before the while loop, otherwise the s:=s+1 expression is pretty useless as s gets reset next time round the loop.
Stuart
StuartBruff wrote:
Do you want the function to stack the values at the end of each iteration, as they do in GU3epm? Or do you want some other behaviour?
Does this function fulfil a specific purpose, or is it a programming exercise/play-ground to try out various techniques?
One other thing, after another look at your function GU4epm, you need to move the initialization of s to before the while loop, otherwise the s:=s+1 expression is pretty useless as s gets reset next time round the loop.
Stuart
If stacking is needed, will something like this do what you want?
Stuart
What are you actually trying to achieve? Are you trying the replicate the answer of the program which uses For Loops with While Loops?
Mike
Stuart....
THanks so much for your help. I was able to add the other parts of the Elemental Percentile Method requirements to the program and arrive at scale and location parameters for a Gumbel,distribution.
DIck..
Richard Cunningham wrote:
Stuart....
THanks so much for your help. I was able to add the other parts of the Elemental Percentile Method requirements to the program and arrive at scale and location parameters for a Gumbel,distribution.
****..
No problem. Interesting application - I hadn't heard of the Gumbel distribution before, so had a quick read of this presentation: http://www.ims.nus.edu.sg/Programs/ocean07/files/abdel1.ppt and this book excerpt: Statistics of Extremes: Theory and Application
If you're not familiar with the capability, you might want to look up distribution/function fitting with Mathcad.
Stuart