Help with solve and symbolic equations
Show older comments
syms vA vB i1 i0 C1 Rf R2 real
syms s
eqn1 = vA - vB == i1 * (1/(s*C1) + Rf);
eqn2 = vA - vB == i0 * R2;
solve([eqn1;eqn2], i0)
solve(i1 * (1/(s*C1) + Rf) == i0*R2, i0)
I'm looking to rearrange the equations for i0 in terms of the other unknowns. The second solve works for this, but the first solve fails (returns Empty sym). Can anyone clarify what I'm doing wrong? Thank you
2 Comments
In the first approach, the LHS of both equations are same and when you try to solve only for variable i0 using two equations it returns empty due to cyclical redundancy.
syms vA vB i1 i0 C1 Rf R2 real
syms s
eqn1 = vA - vB == i1 * (1/(s*C1) + Rf);
eqn2 = vA - vB == i0 * R2;
sol = vpasolve([(eqn1);(eqn2)], [i0, i1])
sol.i0
sol = vpasolve(i1 * (1/(s*C1) + Rf) == i0*R2, i0)
Use also vpasolve for solving equations
Conor Hars
on 16 Jun 2023
Moved: VBBV
on 18 Jun 2023
Accepted Answer
More Answers (0)
Categories
Find more on Equation Solving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!