MATLAB-function that continues the solution of f(x) = 0
3 次查看(过去 30 天)
显示 更早的评论
Hi all,
I have to write a MATLAB-function that continues the solution of f(x) = 0, where f: R^m --> R^(m-1)
When a system consists of m - 1 (non-linear) equations of m unknown, then it has a one-dimensional set of solutions (a curve in R^m) The MATLAB-function should calculate this curve, given a starting point x0 in R^m such that f(x0) is approximately 0 in R^(m-1).
Aside from this, the curve is smooth as long as the matrix of partial derivatives (df_i)/(dx_j) has maximal rank (m-1), so I have to check that too.
The inputs are function f, the derivative df, a starting point x0, an initial step size h0 and the maximum number of steps M. The output is a matrix of zeros of f (a vector of points on the solution curve).
---
I have a hard time deciding how to start this. I do get as hint: determine in which direction v the curve extends. Take a step of size h0 in that direction: X1 = x0 + h0*v. Calculate with multinewton.m (Newton's method) a new point x1 close to X1 on the curve. Repeat this M times (check that the direction does not flip).
---
Thanks in advance!
1 个评论
Roger Stafford
2013-4-7
I'll just give you a couple of vague hints to get you started. As you say, you need to find the direction in which your curve is to extend. You can use matlab's 'null' function applied to your array of first partial derivatives to obtain an m-element vector, (namely your vector v,) which is to be orthogonal to all the m-1 vectors of the partials. After proceeding along this vector a distance h0, use the 'null' function again, this time to find the m-1 dimensional subspace orthogonal to v from that advanced point. Projecting all your original coordinates to coordinates in this subspace you can perform an m-1-dimensional Newton-Raphson procedure which should converge very rapidly provided your step h0 is not too large. Then convert this back to the original coordinates. That would give you one step. At each step you will need a new v and a new subspace. Does this help any?
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!