cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Matrix Programming

DickCun
12-Amethyst

Matrix Programming

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..

4 REPLIES 4
Werner_E
25-Diamond I
(To:DickCun)

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

DickCun
12-Amethyst
(To:Werner_E)

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.....

Werner_E
25-Diamond I
(To:DickCun)

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

-MFra-
21-Topaz II
(To:Werner_E)

Without wanting to "usurp" Werner the merit of having solved the problem, I was intrigued to see how the program works.

Gumbel.jpg

Announcements

Top Tags