Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. %%zad 1
  2. close all;
  3. age = load('3_age.txt');
  4. height = load('3_height.txt');
  5. speed_city = load('3_speed_city.txt');
  6. speed_out = load('3_speed_out.txt');
  7.  
  8. %
  9. % mean_age = mean(age)
  10. % mean_height = mean(height)
  11. % mean_speed_city = mean(speed_city)
  12. %
  13. %
  14. % mean_age = std(age)
  15. % mean_height = std(height)
  16. % mean_speed_city = std(speed_city)
  17. %
  18. % boxplot(age)% nic 92
  19. % figure
  20. % boxplot(height)% nic 194
  21. % figure
  22. % boxplot(speed_city) %28.7244 71.95555
  23. % figure
  24. %
  25. % age = age(age <= 92);
  26. % height = height(height <= 194);
  27. % speed_city = speed_city(speed_city >= 28.7244 & speed_city <= 71.95555);
  28. %
  29. % mean_age = mean(age)
  30. % mean_height = mean(height)
  31. % mean_speed_city = mean(speed_city)
  32. %
  33. % mean_age = std(age)
  34. % mean_height = std(height)
  35. % mean_speed_city = std(speed_city)
  36.  
  37. %% zad 2
  38.  
  39. % % speed_city = sort(speed_city);
  40. % % speed_out = sort(speed_out);
  41. % plot(speed_city, speed_out, '.');
  42. %
  43. % wsp_kor = corrcoef(speed_city, speed_out)
  44.  
  45.  
  46. %% zad 3
  47. % tab = [
  48. % 1.520 4.020
  49. % 0.710 -0.790
  50. % 1.700 4.390
  51. % 0.700 -0.880
  52. % 0.720 -0.760
  53. % 1.700 4.460
  54. % 0.510 -0.090
  55. % 0.810 -0.790
  56. % 0.970 0.030
  57. % 1.100 2.040
  58. % 1.520 4.140
  59. % 0.110 1.000
  60. % 1.520 4.090
  61. % 0.110 1.030
  62. % 0.310 1.580
  63. % 0.970 0.110
  64. % 0.820 -0.780
  65. % 0.510 -0.080
  66. % 0.810 -0.770
  67. % 1.520 4.060
  68. % 0.320 1.610
  69. % 0.710 -0.780
  70. % 0.960 0.010
  71. % 0.700 -0.770
  72. % 1.100 2.050
  73. % 2.020 5.150
  74. % 1.710 4.340
  75. % 0.800 -0.810
  76. % 0.960 0.050
  77. % 0.320 1.630
  78. % ]';
  79. % x = tab(1,:);
  80. % y = tab(2,:);
  81. % X=0:0.01:2.5;
  82. % plot(x, y, '.r')
  83. % hold on
  84. %
  85. % a = polyfit(x, y, 1)
  86. % y5 = a(1)*x+a(2);
  87. % plot(x, y5, 'g')
  88. %
  89. %
  90. % a = polyfit(x, y, 2)
  91. % y = a(1)*X.*X + a(2)*X + a(3);
  92. % plot(X, y, 'y')
  93.  
  94. %% zad 4
  95. % Sr1 =2 od1=3
  96. % Sr2 =5 od2=1
  97. %
  98. % Sr1 =2 od1=2
  99. % Sr2 =5 od2=1
  100.  
  101. x = -10:0.01:10;
  102.  
  103. y1 = normpdf(x, 2, 3);
  104. y2 = normpdf(x, 5, 1);
  105. plot(x, y1);
  106. hold on
  107. plot(x,y2)
  108. figure
  109.  
  110. y3 = normpdf(x, 2, 2);
  111. y4 = normpdf(x, 5, 1);
  112. plot(x, y3);
  113. hold on
  114. plot(x,y4)
  115. figure
  116.  
  117. [X,Y,T,AUC] = perfcurve(y1,y2,'virginica');
  118. % plot(X, Y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement