# MATLAB problem

1. Apr 27, 2010

### Appa

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. Apr 27, 2010

### uart

Well the obvious starting point is to put your set of linear equations in matrix form. Is that the part you're stuck on?

3. Apr 28, 2010

### mikeph

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.

eg.

[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.