Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!


  1. Apr 27, 2010 #1
    I'm having trouble working my way through a MATLAB problem. How can I solve a matrix equation for four different variables?

    Here is my input: (I know all variables except I1 through I4)

    V = [(R1*I1 -j*(1/(omega*C1))*(I1-I2) +j*omega*L2*(I1-I3)-E1);
    (-j*(1/(omega*C1))*(I2-I1) +j*omega*L1*I2 -j*(1/(omega*C2))*(I2-I4));
    (j*omega*L3*I3 +j*omega*L2*(I3-I1) -j*(1/(omega*C3))*(I3-I4));
    (-j*(1/(omega*C3))*(I4-I3) -j*(1/(omega*C2))*(I4-I2) +R2*I4 -E2)]

    So how do I compute my needed variables out? The answer is propably simple, but I'm a complete beginner with MATLAB, and I really need help with this!

    P.S. the integer j is the imaginary unit.
  2. jcsd
  3. Apr 27, 2010 #2


    User Avatar
    Science Advisor

    Well the obvious starting point is to put your set of linear equations in matrix form. Is that the part you're stuck on?
  4. Apr 28, 2010 #3
    Try the symbolic toolbox "solve" function?

    Looks like you have 4 equations is V is a <4x1>, so you'll have four symbolic variables I1-I4.


    [type what your other values are for omega, etc.]
    syms I1 I2 I3 I4
    solve('V(1) - R1*I1 -j*(1/(omega*C1))*(I1-I2) +j*omega*L2*(I1-I3)-E1', ...)

    should tell you what I1-4 are, I think.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook