Using MNEWT


opus5340
11-12-2009, 07:55 AM
Hello Everyone. This is my first post.

I have 3 equations that I am trying to solve for 3 unknowns.
I tried using the MNEWT.DEM file with modifications but I do not understand how to set the alpha matrix with my equations.

I have these 3 equations:
func = Y * (-0.045045^ (1 / X)) + Z - 10
func = Y * (-0.303034^ (1 / X)) + Z - 20
func = Y * (-1^ (1 / X)) + Z - 50

Best I can guess is the alpha matrix units are a negative differential of the corresponding sub-equation. And I can see this easily from the sample file. I've tried to plug my differentials into the alpha matrix with no luck. I think it's because the structure of my equation is more complex than the sample equations.

Can anyone please advise as to how I can obtain the proper alpha matrix and solve for these 3 unknowns?

Else, is there a better way to solve the set of unknowns in a different method?

Your help is very much appreciated.
VG

MPD78
11-13-2009, 11:58 AM
I am not sure if you took the time to search the forum for mnewt.h, but I did and I found this similar question and answer about how to define the matrix. Although this is for a C routine not a C++ routine. So be careful.

See this post.

http://www.nr.com/forum/showthread.php?t=1531&highlight=mnewt

Hope that helps.

As for this

Else, is there a better way to solve the set of unknowns in a different method?

Read the first paragraph in the NR3 book in section 9.6.

Thanks
Matt