Solving simultaneous equations numerically

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 comentarios

Star Strider
Star Strider el 10 de Mayo de 2017
What is the initial problem you are solving?
It looks like you did not set up the problem correctly.
yes it is all good up to v0; then I get that equation to get the values of s^2,s and numerical. The part I need help is with the S, just to solve the equations because it gets : I just need to solve R2 and C
if true
% C: [0×1 sym]
R2: [0×1 sym]
Everything up to the ‘S’ assignment have nothing at all to do with the equations in your solve call for ‘S’.
Additionally:
Eq1 = (1/(R*C+R*R2*C))==a;
Eq2 = R/(R*C+R*R2*C)==a1;
Eq1 =
8000000000*C*(R2 + 1) == 1
Eq2 =
40800000*C*(R2 + 1) == 1
Those are incompatible.
diana betancur
diana betancur el 11 de Mayo de 2017
yes but I wanted to solve first for C and then plug it into the second equation to get a value for R2
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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 10 de Mayo de 2017

Editada:

el 11 de Mayo de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by