Solving system of 2 equations

2 ビュー (過去 30 日間)
NMK
NMK 2017 年 2 月 8 日
編集済み: John D'Errico 2017 年 2 月 8 日
Hi,
I am trying to solve a system of two equations which looks like this:
R1 = Gy*(r+lam)*(rU1)+lam*((integral((1-Gx),R1,yl))-(1-Gy)*yl);
yl = rU1-(lam/((r+lam)*Gy))*(integral((Gy-Gx),R1,yl));
where rU1, lam, r are parameter values.
Gy and Gx are uniform distributions over [0,1]
I try to solve them like this:
syms R1 yl
eqn1 = R1 == Gy*(r+lam)*(rU1)+lam*((integral((1-Gx),R1,yl))-(1-Gy)*yl);
eqn2 = yl == rU1-(lam/((r+lam)*Gy))*(integral((Gy-Gx),R1,yl));
sol = solve([eqn1, eqn2], [R1, yl]); R1Sol = sol.R1; ylSol = sol.yl;
But I get an error: Undefined function 'mtimes' for input arguments of type 'prob.UniformDistribution'.
Can someone help solving the error?
Thanks,

回答 (1 件)

John D'Errico
John D'Errico 2017 年 2 月 8 日
編集済み: John D'Errico 2017 年 2 月 8 日
Gy and Gx are distributions. What does it mean to take the product of Gy with some expression, and then try to equate that to a number? (In terms of mathematics: Nothing.) There are other points of confusion in what you have written.
So this is not an error that can be simply solved by us, only by you, in deciding what you meant by those equations. Once you are able to write down a valid expression in terms of mathematics, only then can you formulate a solution in MATLAB.

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by