Eddie_1337

sdp p2

Mar 9th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. clc
  2. clear
  3.  
  4. x = 0:10;
  5. p = 0.2;
  6. n = 10;
  7. y1 = binopdf(x, n, p);
  8. subplot(2, 2, 1);
  9. stem(y1);
  10. y2 = binocdf(x, n, p);
  11. subplot(2, 2, 2);
  12. stairs(y2);
  13.  
  14. x = 0:15;
  15. l = 5;
  16. y3 = poisspdf(x, l);
  17. subplot(2, 2, 3);
  18. stem(y3);
  19. y4 = poisscdf(x, l);
  20. subplot(2, 2, 4);
  21. stairs(y4);
Add Comment
Please, Sign In to add comment