How to input and solve non-linear system of equations in a matrix form
32 views (last 30 days)
Show older comments
Hi!
I am trying to solve the following system of non-linear equations in Matlab and I am stucked with it for a few days...
(x_Tx - x_Rx_i).^2 + (y_Tx - y_Rx_i).^2 = 10.^( (P_Tx - P_L0 - P_Rx_i) / 5n )
Unknowns are:
x_Tx (Transmitter x location)
y_TX (Transmitter y location)
P_Tx (Transmitter power)
Knowns are:
x_Rx_i (measuremetns' x location) - vector of i elements
y_Rx_i (measurements' y location) - vector of i elements
P_Rx_i (received power at locations x_Rx_i, y_Rx_i ) - vector of i elements
P_L0 (reference power) - scalar
n (path loss coeficient) - scalar
i (number of measurement points at locations x_Rx_i, y_Rx_i and received power P_Rx_i )
My questions are:
1. How to input such non-linear system of equations into Matlab in a matrix form?
2. Which functions can be used to solve this?
Thank you for your help!
0 Comments
Answers (2)
Babak
on 5 Dec 2012
Offcourse you cannot write a nonlinear equation in a matrix form.
Matrix form is only possible for linear sets of equations.
You need to use a nonlinear equation solver or you write one yourself. If you have license to MAATLAB's Optimization toolbox (check it by giving the >>ver command in the command window) then you can use the command fsolve().
By the way, you need to have at least as many equations as the number of your unknowns, which doesn't seem true in your case. If x_Tx, y_Tx, P_Tx are scalar (for example), you have only one equation but 3 unknown. If they are vectors of 2 element, you have 2 equations but 6 unknowns.. Please check your equations again because I think you need to have more equations.
6 Comments
Babak
on 5 Dec 2012
I don't understand. There is only one equation and he is using the notation .^ repeatedly which gives the impression that there are vectors under the operator .^ but obviously there are 3 unknowns and 1 equation...
Marko: You need to find more equations because only 1 equation for 3 unknowns is not sufficient.
John BG
on 16 Feb 2016
set 1 parameter as variable and set the other 2 constant, have a look, then sweep one of the parameters you set as constant before, and repeat for the other one, you obtain 3 sets of curves
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!