Solving system of 2 equations

1 次查看(过去 30 天)
NMK
NMK 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 CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by