Translating this algorithm into mathematica code
- To: mathgroup at smc.vnet.net
- Subject: [mg107380] Translating this algorithm into mathematica code
- From: Kamil <meetkamil at gmail.com>
- Date: Thu, 11 Feb 2010 05:18:50 -0500 (EST)
Dear all, I am kind of new to this forum and mathematica but I have found the post here quite interesting and helpful. I am having problem translating this algorithm to mathematica code and I hope I can be helped. The algorith is as given below. Thanks to you all. Suppose that for a given matrix A ( n x n ) that is a function of say x the non-trivial solution is desired. The following algorithm is used to compute the value of x that makes the determinant of A zero. INPUT (i) The matrix A and find matrix B, where B = - dA/dx (i.e derivative of A wrt x) (ii) The initial estimate of x (iii) A tolerance for convergence say delta =EF=80 (a small positive number) is selected. ITERATION (a) Choose the initial guess x=EF=80 (0) and start the iteration. (b) Compute the eigenvalues of the matrix (A - B) based upon the initial guess x=EF=80 (0) . (c) Evaluate the minimum eigenvalue of found in step b and assign this value to epsilon (d) Compute the new estimate x=EF=80 (1)=x(0) + epsilon (e) Compute the matrices A(x) and B(x) by substituting x= x(1) (f) Repeat steps (b)-(e) for kth iteration until the condition Abs(epsilon.... in step c) < delta in step (iii) =EF=80 is satisfied. (g) Stop the iteration. (h) Store the value of x(k) (i) Repeat steps (a)-(h) to evaluate another x(k) =EF=80 for different starting value x=EF=80 (0) .
- Follow-Ups:
- Re: Translating this algorithm into mathematica code
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Translating this algorithm into mathematica code