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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Matrix Programming

DickCun
1-Newbie

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

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

-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

Top Tags