Solving N linear equations for N unknowns using arrays? Is this even possible?

1 view (last 30 days)
Greetings all,
I'm trying to think this out and to see if it's even possible - here it goes, hear me out for this one :). I can always clarify if needed.
I have the following base equation to start this discussion off:
sigma_a = sigma1*[1-Rh(Zeta)]+sigma2*Rh(Zeta)
This will form 4 equations based on a few things (allow me to explain please). I made apparent conductivity (sigma_a) measurements with two different instruments over two directions (two instruments* two directions = 4 equations). So we can say that:
sigma_a_InstrumentOneWest=sigma1*[1-Rh(ZetaInstrument1)]+sigma2*Rh(ZetaInstrument1)
sigma_a_InstrumentOneEast=sigma1*[1-Rh(ZetaInstrument1)]+sigma2*Rh(ZetaInstrument1)
sigma_a_InstrumentTwoWest=sigma1*[1-Rh(ZetaInstrument2)]+sigma2*Rh(ZetaInstrument2)
sigma_a_InstrumentTwoEast=sigma1*[1-Rh(ZetaInstrument2)]+sigma2*Rh(ZetaInstrument2)
where Zeta=Thickness/Coil spacing of the particular instrument (Instrument1 is 3.67, Instrument2 is 1.25). Thickness I define/code as being
Thickness=(0.1:0.1:9)'
such that it is now Rh(Thickness/Coil Spacing). Rh is a function defined as:
sqrt(4(Zeta)^2)-2*Zeta. Note that Zeta changes per thickness over coil spacing of the respective instrument, and therefore Rh will change as a function Zeta. I already have this coded up.
The 4 sigma_a's, if you will, I have as an array of values (16 values per array, 4 arrays total). The only thing I don't have, and need to solve for, is sigma1 and sigma2. Now, I did this on scratch paper with the good old substitution method. Sure I get an answer for one case, but I'd like to verify it across all cases.
Apologies for the long and detailed explanation, but I'm trying to see how I can solve for sigma1 and sigma2 in an automated sense with MATLAB.
If I need to explain anything further or provide more code, please let me know. As always, I appreciate the assistance and I learn a lot from posting here!
-J

Answers (1)

David H
David H on 14 Apr 2015
As you have written it, it seems that
sigma_a_InstrumentOneWest=sigma_a_InstrumentOneEast
and the same for the instrument 2... hence this reduces to only two simultaneous equations. Also
sqrt(4(Zeta)^2)-2*Zeta = 0
for positive Zeta, which you have. Which would just mean
sigma_a_InstrumentOneWest=sigma_a_InstrumentOneEast =..= sigma_1
Assuming you have made some mistakes here so it is quite hard to help. But in general I would take a look at the matlab symbolic toolboxes if you have them. They have fairly simple to use solvers for analytic expressions. Otherwise the "\" function can be used to solve sets of simultaneous equations numerically.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!