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 )
x_Tx (Transmitter x location)
y_TX (Transmitter y location)
P_Tx (Transmitter power)
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!
No products are associated with this question.
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.
That's right I have always 3+ elements in vectors thus I have the same or even more equations than unknowns...
So how to input all these equations into Matlab to use them e.g. with fsolve()?
I can't put them in manually if I have few 100 or 1000 elements in vectors
I need to input them somehow with matrices of coefficients, etc... and I don't know how to do this...
And yes, all these unknowns are scalars while I have the Transmitter on location x_Tx,y_Tx, which is transmitting with the power P_Tx...
x_Tx (Transmitter x location) - scalar
y_TX (Transmitter y location) - scalar
P_Tx (Transmitter power) - scalar