Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. %% Program P1_9_1
  2. clear all; close all; clc;
  3. N=500;
  4. n=1:N;
  5. a = -3;
  6. b = 3;
  7. r1=(a)+(b-a).*rand(1,N);
  8. figure(1);
  9. plot(n,r1);
  10. title('Tolydusis skirstinys')
  11. xlabel('Imties numeris n');
  12. ylabel('Amplitude');
  13.  
  14.  
  15. %% Program P1_9_2
  16. clear all; close all; clc;
  17. N=500;
  18. n=1:N;
  19. a = 0; % vidurkis
  20. b = 20; % nuokrypis
  21. r=a+ b.*randn(1, N);
  22. plot(n,r);
  23. title('Gauso skirstinys')
  24. xlabel('Imties numeris n');
  25. ylabel('Amplitude');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement