Advertisement
Guest User

Untitled

a guest
Dec 19th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. syms l
  2. x=sym('x',[1,2])
  3. c=[1 3];
  4. q=[0.3 0.5];
  5. R0=0.98;
  6. Cost=sum(c.*x);
  7. Rel=(1-q(1)^(x(1)+1))*(1-q(2)^(x(2)+1))
  8. L=Cost+l*(Rel-R0)
  9. solve([Rel==R0, gradient(L)==0], [x l])
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement