Advertisement
HTML

HOWAR_EGN1007_CH10.m practice

Jan 22nd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.51 KB | None | 0 0
  1.     Classroom License -- for classroom instructional use only.
  2.  
  3. >> x = 9
  4.  
  5. x =
  6.  
  7.      9
  8.  
  9. >> b = sqrt(x)
  10.  
  11. b =
  12.  
  13.      3
  14.  
  15. >> rem(10, 3)
  16.  
  17. ans =
  18.  
  19.      1
  20.  
  21. >> y = [1 6 3 9 4]
  22.  
  23. y =
  24.  
  25.      1     6     3     9     4
  26.  
  27. >> sort(y, 'descend')
  28.  
  29. ans =
  30.  
  31.      9     6     4     3     1
  32.  
  33. >> c = mean(y)
  34.  
  35. c =
  36.  
  37.     4.6000
  38.  
  39. >> d = median(y)
  40.  
  41. d =
  42.  
  43.      4
  44.  
  45. >> e = mode(y)
  46.  
  47. e =
  48.  
  49.      1
  50.  
  51. >> f = std(y)
  52.  
  53. f =
  54.  
  55.     3.0496
  56.  
  57. >> x = cos(pi)
  58.  
  59. x =
  60.  
  61.     -1
  62.  
  63. >> y = sin(2 * pi)
  64.  
  65. y =
  66.  
  67.   -2.4493e-16
  68.  
  69. >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement