difficulty solving simulataneous equations
Show older comments
I am new to symbolic editor and am having difficulty getting a non-empty solution. As a test I have a problem I can solve by hand yet can't get the editor to generate a non-empty answer,
By hand, my answer is iaD = (1/(La+Lb) ( Vb - Va + Rb*ib - Ra*ia ). I arrive at this answer by 'back substituing' the 2nd two eqations into the first equation. My real problem is a larger network but this problem displays my basic problem.
% rl2.m
% solve simple R, L equations in symbolic editor
% two phases in series
clear all
% variables
% Va, Vb, Ra, Rb, La and Lb are "fixed" inputs
% variable("unknowns") are ia, ib, iaD and ibD
clear syms Ra Rb La Lb Va Vb iaD ibD ia ib
syms Ra Rb La Lb Va Vb iaD ibD ia ib
% check
syms
% equations
clear eqns
eqns = [Lb*ibD - La*iaD + Rb*ib - Ra*ia + Vb == Va, ia == -ib,iaD == -ibD]
% solve
S = solve(eqns, ia, ib)
Accepted Answer
More Answers (1)
syms Ra Rb La Lb Va Vb iaD ibD ia ib
eqns = [Lb*ibD - La*iaD + Rb*ib - Ra*ia + Vb == Va, iaD == -ibD]
S = solve(eqns, [iaD,ibD])
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!