Solving system of 2 equations
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
John D'Errico
il 8 Feb 2017
Modificato: John D'Errico
il 8 Feb 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 Commenti
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!