Solving simultaneous equations numerically

조회 수: 3 (최근 30일)
diana betancur
diana betancur 2017년 5월 10일
편집: Walter Roberson 2017년 5월 11일
I am unable to get the value of R2 and C, any advice ... thank you
clear all
close all
syms s I1 I2 R2 C
a=8000
a1=4.08E7
l=1;
R=1E6;
e1=(s+R)*I1-R*I2==1;
i1=solve(e1,I1);
e2=-R*i1+(R2+R+1/(C*s))*I2==0;
i2=solve(e2,I2);
v0=(1/(C*s))*i2;
S=solve((1/(R*C+R*R2*C))==a,R/(R*C+R*R2*C)==a1)
  댓글 수: 5
diana betancur
diana betancur 2017년 5월 11일
yes but I wanted to solve first for C and then plug it into the second equation to get a value for R2
Star Strider
Star Strider 2017년 5월 11일
That won’t work.
Eq1 = (1/(R*C+R*R2*C))==a;
Eq2 = R/(R*C+R*R2*C)==a1;
Eq1 = simplify(Eq1)
Eq2 = simplify(Eq2)
Cs = solve(Eq1, C)
Eq2s = subs(Eq2,C,Cs)
Eq2s = Eq2s * (8000000000*R2 + 8000000000)
R2s = solve(Eq2s,R2)
Eq1 =
8000000000*C*(R2 + 1) == 1
Eq2 =
40800000*C*(R2 + 1) == 1
Cs =
1/(8000000000*R2 + 8000000000)
Eq2s =
(40800000*(R2 + 1))/(8000000000*R2 + 8000000000) == 1
Eq2s =
40800000*R2 + 40800000 == 8000000000*R2 + 8000000000
R2s =
-1

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by