Solving system of 2 equations
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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,
0 comentarios
Respuestas (1)
John D'Errico
el 8 de Feb. de 2017
Editada: John D'Errico
el 8 de Feb. de 2017
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.
0 comentarios
Ver también
Categorías
Más información sobre Equation Solving en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!