Equations solving on Matlab , 3 unkowns and 2 equations.

조회 수: 4 (최근 30일)
Rana Önem
Rana Önem 2020년 5월 29일
댓글: Rana Önem 2020년 5월 29일
v0=vf+ vfg*x;
u0=uf+ufg*x;
If we know vf,vfg,uf,ufg values how can I calculate x? Can you help me please?
Also there is this eq. m2*(he-u0)==m1*(he-u1); , we know he, m1,u1, values too.
In addition this eq. m2=v/vO; we know v value.
  댓글 수: 2
Robin Kirsch
Robin Kirsch 2020년 5월 29일
편집: Robin Kirsch 2020년 5월 29일
if you have the 2 formulas m2 *(he... and m2 = v/v0 , dont you have 3 unknowns and 3 equations then? see my answer below
or is v0 of the first equation different from the m2 = v/vO?
Rana Önem
Rana Önem 2020년 5월 29일
No it is not diffrent. I'm sorry my bad.

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

답변 (1개)

Robin Kirsch
Robin Kirsch 2020년 5월 29일
If you simply want to know x, v0 and u0 you can just use the solve method. I assumed random variables for the known constants in my example.
syms x v0 u0
vf = 3;
vfg = 5;
uf = 2;
ufg = 1;
v = 7;
he = 2.5;
m1 = 4;
u1 = 1.1;;
eqn1 = v0 == vf+ vfg*x;
eqn2 = u0 == uf+ufg*x;
eqn3 = v/v0 * (he - u0) == m1*(he-u1);
[x v0 u0] = solve([eqn1, eqn2, eqn3], [x, v0, u0])
  댓글 수: 3
Brent Kostich
Brent Kostich 2020년 5월 29일
If you use 'syms' you get symbolic variables. They do not produce a numeric output. You can substitute numeric values for the syms to get a numeric output.
Rana Önem
Rana Önem 2020년 5월 29일
Okay I'll try this, thank you so much!

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

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by