Tutorial: Systems of Nonlinear Equation

For n equations with n unknowns

Problem 1

Solve for x, y from

𝑓1(π‘₯,𝑦)=π‘¦βˆ’1/2(𝑒(π‘₯/2)+𝑒(βˆ’π‘₯/2))=0𝑓2(π‘₯,𝑦)=9π‘₯2+25𝑦2βˆ’225=0𝑓_1 (π‘₯,𝑦)=π‘¦βˆ’1/2 (𝑒^{(π‘₯/2)}+𝑒^{(βˆ’π‘₯/2)} )=0 \\ 𝑓_2 (π‘₯,𝑦)=9π‘₯^2+25𝑦^2βˆ’225=0

Tutorial: MATLAB

Create MATLAB program for solving a system of non-linear equations

Download the tutorial source file and fill in the blanks.


1) Define functions that returns vector F(x) and matrix J(x).

Matrix myFuncEx1(Matrix X); // X: vector in. Returns Vector F (nx1)

Matrix myJacobEx1(Matrix X); // X: vector in. Returns Matrix J (nxn)

2) Define a system non-linear solver

Matrix nonlinearSys(Matrix Func(Matrix _Z), Matrix Jacob(Matrix _Z), Matrix _Z0, double tol);

returns solution vector XN (nx1)

3) Then, solve the example problem

Tutorial: C-Programming

  1. Create a new project β€œ TU_SystemNonlinear” with Visual Studio, under the directory \NP\tutorial\

  2. Download the tutorial source file from

  1. Add the downloaded source file under the project folder.

  2. Fill-in the blanks

Problem 2

Solve for the 3-DOF transformation, angle (ΞΈ) and translation T=[Ξ”x, Ξ”y], to move the vehicle to the new pose?

Solution= [ΞΈ=30 deg , Ξ”x =100 , Ξ”y= 100 ]

Last updated

Was this helpful?