Post Reply 
Newton's Method
01-10-2015, 11:01 PM (This post was last modified: 01-10-2015 11:23 PM by Han.)
Post: #9
RE: Newton's Method
Snorre,

I think your program is fine, but it doesn't match exactly with the math above your code. The math presumes f(x) is a column vector whereas it appears you have a row vector. Strangely the CAS seems to not mind this and allows the multiplication to go through as is. Nice find!

I was planning to write something similar (to incorporate into the equation library program), but basically had a few extra lines in mind (that now seem unnecessary). I was thinking it was necessary to transpose the f vector to ensure valid multiplication. The CAS seems to be rather flexible in this respect!

Lastly, defining the jacobi as you did vs leaving it untransposed (how I thought about doing it) comes down to deciding between two transposes vs a single transpose (needed prior to taking inverse). I think the latter choice would give a slight speedup in cases where the number of iterations is significantly large.

As for experience, I doubt I have any more experience than anyone here -- perhaps more chunks of free time to tinker, maybe.

Edit: I think there may be a few other ways to exit the iterations. You've listed a few, but we could also exit based on whether max|f(x_i)| is within a certain tolerance as suggested by: http://ocw.usu.edu/Civil_and_Environment...Matlab.pdf

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Newton's Method - Han - 01-17-2014, 09:45 PM
RE: Newton's Method - FrankiD - 03-29-2014, 06:29 PM
RE: Newton's Method - Han - 03-30-2014, 01:47 AM
RE: Newton's Method - FrankiD - 03-30-2014, 02:45 AM
RE: Newton's Method - Han - 03-30-2014, 02:08 PM
RE: Newton's Method - FrankiD - 03-30-2014, 06:25 PM
RE: Newton's Method - Han - 04-07-2014, 07:47 PM
RE: Newton's Method - Snorre - 01-10-2015, 09:52 PM
RE: Newton's Method - Han - 01-10-2015 11:01 PM
RE: Newton's Method - Gene222 - 09-11-2023, 11:29 PM



User(s) browsing this thread: 1 Guest(s)