Problem with solve function

2 views (last 30 days)
Maruthi prasanna C
Maruthi prasanna C on 16 Mar 2020
Answered: Stephan on 16 Mar 2020
syms s vs v1 v2 vo s R1 R2 R3 Rc1 Rc2 gm1 gm2 gm3 gmc1 gmc2 C1 C2 Cc1 Cc2 k1 k2;
% Nodal Analysis Equations
eq1 = '-gm1*vs + v1/R1 + v1*s*C1 - v2/(1/(s*Cc1)+Rc1)+ vo/(1/(s*Cc2)+Rc2)=0'
eq2 = 'gm2*v1 + v2/R2 + v2/(1/(s*Cc1)+Rc1) + v2*s*C2=0'
eq3 = 'gm3*v2 + vo/R3 + vo/(1/(s*Cc2)+Rc2) + vo*s*C3=0'
[v1,v2,vo]=solve(eq1,eq2,eq3,v1,v2,vo);
eq1 =
'-gm1*vs + v1/R1 + v1*s*C1 - v2/(1/(s*Cc1)+Rc1)+ vo/(1/(s*Cc2)+Rc2)=0'
eq2 =
'gm2*v1 + v2/R2 + v2/(1/(s*Cc1)+Rc1) + v2*s*C2=0'
eq3 =
'gm3*v2 + vo/R3 + vo/(1/(s*Cc2)+Rc2) + vo*s*C3=0'
Error using solve>getEqns (line 418)
List of equations must not be empty.
Error in solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});
Error in ThreeStageIndirectCompensation_Class_A (line 17)
[v1,v2,vo]=solve(eq1,eq2,eq3,v1,v2,vo);
>>
  1 Comment
Maruthi prasanna C
Maruthi prasanna C on 16 Mar 2020
Need to know what doesn error "List of equations must not be empty." mean & fix for it

Sign in to comment.

Accepted Answer

Stephan
Stephan on 16 Mar 2020
syms s vs v1 v2 vo s R1 R2 R3 Rc1 Rc2 gm1 gm2 gm3 gmc1 gmc2 C1 C2 C3 Cc1 Cc2 k1 k2;
% Nodal Analysis Equations
eq1 = -gm1*vs + v1/R1 + v1*s*C1 - v2/(1/(s*Cc1)+Rc1)+ vo/(1/(s*Cc2)+Rc2)==0
eq2 = gm2*v1 + v2/R2 + v2/(1/(s*Cc1)+Rc1) + v2*s*C2==0
eq3 = gm3*v2 + vo/R3 + vo/(1/(s*Cc2)+Rc2) + vo*s*C3==0
[v1,v2,vo]=solve(eq1,eq2,eq3,v1,v2,vo)

More Answers (0)

Categories

Find more on Partial Differential Equation Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!