Advertisement
Adytzu04

l4p4 SPD

Apr 1st, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.58 KB | None | 0 0
  1. %Repartitia Stildent. Sa se reprezinte grafic densitatea de probabilitate
  2. %Stildent pt n= 2,5,10 si densitatea de probabilitate normala redusa.
  3.  
  4.  
  5.  
  6. clc
  7. clear all
  8. help l4p4.m
  9.  
  10.  
  11.  
  12.  
  13. x=[-5:0.1:5];
  14.  
  15. n1=2;
  16. f1=((gamma((n1+1)/2)) / ((gamma(n1/2))*sqrt(n1*pi)) *(1+x.^2/n1).^(-n1+1)/2)
  17.  
  18. n2=5;
  19. f2=((gamma((n2+1)/2)) /(gamma(n2/2)*sqrt(n2*pi)) *(1+x.^2/n2).^(-n2+1)/2)
  20.  
  21. n3=10;
  22. f3=((gamma((n3+1)/2)) /(gamma(n3/2)*sqrt(n3*pi)) *(1+x.^2/n3).^(-n3+1)/2)
  23.  
  24.  
  25.  
  26. y=1/((sqrt(2*pi)) * exp^((-x.^2)/2))
  27.  
  28.  
  29.  
  30.  
  31.  
  32. subplot(2,1,1);
  33. plot(x,f1,x,f2,x,f3);
  34.  
  35. subplot(2,1,2);
  36. plot(x,y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement