Hello everyone! I am new to MATLAB, and I am trying to use it to solve for some variables in a system of equations (this is for the node-voltage equations of a filter, but that isn't fully relevant)
syms Va Vi Vhp Vlp Vbp R2 R3 R1 Rf R s C RH RB RL RF Vo
eqn0 = (( (Va-Vi)/R2) + ( (Va-Vbp)/R3) )== 0;
eqn1 = ( ((Va-Vlp)/R1) + ( (Va-Vhp)/Rf) )==0 ;
eqn2 = (-(Vhp/R) -(Vbp*s*C))==0;
eqn3 = (-(Vbp/R) - (Vlp*s*C))==0;
eqn4 = (-Vhp/RH -Vbp/RB -Vlp/RL - Vo/RF==0);
S = solve(eqn1, eqn2, eqn3, eqn0, eqn4)
Va, Vi, Vhp, Vlp, Vbp, and Vo are all "unknowns", while the rest are supposed to be treated as constants. Ideally, I want it to solve for H(s) = (Vo/Vi) .. Or really, I'd prefer to just be able to find out what every term rearranges to (i.e solving for Vbp, Vhp, Vlp, in terms of the other ones).
But when I run "solve", I get as follows.
Within these solutions are two (? why? is it not linear?.. Im not sure..) different expressions.
-(Vlp*(RH - (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo - RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
-(Vlp*(RH + (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo - RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
I am new to MATLAB and I do not really have a concept of the nature of linear equations (I haven't taken linear algebra) besides "you need one for every variable you want to find", so I do not know where this issue may be coming from. Is it because all the other "variables" (constants) are being treated as variables and there aren't enough equations? I've checked my equations with two friends and I am confident there's nothing wrong with them.
Thanks!