Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi.....
I have attached a worksheet in Mathcad 15 where I have iterated several functions in finding the parameters of the Gumbel PDF. It works fine when I iterate in succession but my attempt to program the solution doesn't produce the same results.
Cold use some help.
Thanks for any help provided.
Dick..
There were two problems:
1) A program immediately exits when it encounters a return statement. You have the return statement as the last command INSIDE of your loop, so the program exits after the first round - it does not iterate 5 times.
2) Compared to your manual iteration you switched the indices on delta in the last two assignments in the program. Not sure which one is correct.
Regards, Werner
Werner......
Once again.......Thanks so much for your help. I really admire your solutions to discussions because of the simplicity you provide..
Can't thank yo enough.
Dick.....
Just noticed that the calculation of d in the program is never used and should be omitted. Furthermore its better to move the local function definition of f() outside the loop (or even outside the program.
So it could be
or even
But then - maybe your goal is writing a while-loop instead of the for loop which runs until d is smaller than a certain threshold.
WE
Without wanting to "usurp" Werner the merit of having solved the problem, I was intrigued to see how the program works.