Advertisement
Guest User

LJD CSE assignment 3

a guest
Sep 23rd, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. EDU>> % question 3.10
  2. a=(0:0.1:6.2);
  3. sin(a);
  4. cos(a);
  5. tan(a);
  6. TABLE=[a',sin(a)',cos(a)',tan(a)']
  7.  
  8. TABLE =
  9.  
  10. 0 0 1.0000 0
  11. 0.1000 0.0998 0.9950 0.1003
  12. 0.2000 0.1987 0.9801 0.2027
  13. 0.3000 0.2955 0.9553 0.3093
  14. 0.4000 0.3894 0.9211 0.4228
  15. 0.5000 0.4794 0.8776 0.5463
  16. 0.6000 0.5646 0.8253 0.6841
  17. 0.7000 0.6442 0.7648 0.8423
  18. 0.8000 0.7174 0.6967 1.0296
  19. 0.9000 0.7833 0.6216 1.2602
  20. 1.0000 0.8415 0.5403 1.5574
  21. 1.1000 0.8912 0.4536 1.9648
  22. 1.2000 0.9320 0.3624 2.5722
  23. 1.3000 0.9636 0.2675 3.6021
  24. 1.4000 0.9854 0.1700 5.7979
  25. 1.5000 0.9975 0.0707 14.1014
  26. 1.6000 0.9996 -0.0292 -34.2325
  27. 1.7000 0.9917 -0.1288 -7.6966
  28. 1.8000 0.9738 -0.2272 -4.2863
  29. 1.9000 0.9463 -0.3233 -2.9271
  30. 2.0000 0.9093 -0.4161 -2.1850
  31. 2.1000 0.8632 -0.5048 -1.7098
  32. 2.2000 0.8085 -0.5885 -1.3738
  33. 2.3000 0.7457 -0.6663 -1.1192
  34. 2.4000 0.6755 -0.7374 -0.9160
  35. 2.5000 0.5985 -0.8011 -0.7470
  36. 2.6000 0.5155 -0.8569 -0.6016
  37. 2.7000 0.4274 -0.9041 -0.4727
  38. 2.8000 0.3350 -0.9422 -0.3555
  39. 2.9000 0.2392 -0.9710 -0.2464
  40. 3.0000 0.1411 -0.9900 -0.1425
  41. 3.1000 0.0416 -0.9991 -0.0416
  42. 3.2000 -0.0584 -0.9983 0.0585
  43. 3.3000 -0.1577 -0.9875 0.1597
  44. 3.4000 -0.2555 -0.9668 0.2643
  45. 3.5000 -0.3508 -0.9365 0.3746
  46. 3.6000 -0.4425 -0.8968 0.4935
  47. 3.7000 -0.5298 -0.8481 0.6247
  48. 3.8000 -0.6119 -0.7910 0.7736
  49. 3.9000 -0.6878 -0.7259 0.9474
  50. 4.0000 -0.7568 -0.6536 1.1578
  51. 4.1000 -0.8183 -0.5748 1.4235
  52. 4.2000 -0.8716 -0.4903 1.7778
  53. 4.3000 -0.9162 -0.4008 2.2858
  54. 4.4000 -0.9516 -0.3073 3.0963
  55. 4.5000 -0.9775 -0.2108 4.6373
  56. 4.6000 -0.9937 -0.1122 8.8602
  57. 4.7000 -0.9999 -0.0124 80.7128
  58. 4.8000 -0.9962 0.0875 -11.3849
  59. 4.9000 -0.9825 0.1865 -5.2675
  60. 5.0000 -0.9589 0.2837 -3.3805
  61. 5.1000 -0.9258 0.3780 -2.4494
  62. 5.2000 -0.8835 0.4685 -1.8856
  63. 5.3000 -0.8323 0.5544 -1.5013
  64. 5.4000 -0.7728 0.6347 -1.2175
  65. 5.5000 -0.7055 0.7087 -0.9956
  66. 5.6000 -0.6313 0.7756 -0.8139
  67. 5.7000 -0.5507 0.8347 -0.6597
  68. 5.8000 -0.4646 0.8855 -0.5247
  69. 5.9000 -0.3739 0.9275 -0.4031
  70. 6.0000 -0.2794 0.9602 -0.2910
  71. 6.1000 -0.1822 0.9833 -0.1853
  72. 6.2000 -0.0831 0.9965 -0.0834
  73.  
  74. EDU>>
  75. EDU>> % Question 3.11
  76. A=4;
  77. t=0:10;
  78. w=0.6;
  79. x=4*cos(0.6*0:10);
  80. [t',x']
  81.  
  82. ans =
  83.  
  84. 0 4.0000
  85. 1.0000 2.1612
  86. 2.0000 -1.6646
  87. 3.0000 -3.9600
  88. 4.0000 -2.6146
  89. 5.0000 1.1346
  90. 6.0000 3.8407
  91. 7.0000 3.0156
  92. 8.0000 -0.5820
  93. 9.0000 -3.6445
  94. 10.0000 -3.3563
  95.  
  96. EDU>> %question 3.12
  97. A=4;
  98. t=0:10;
  99. w=0.6;
  100. acceleration=A*w^2*cos(w*t)
  101. [t',x',acceleration']
  102.  
  103.  
  104. acceleration =
  105.  
  106. Columns 1 through 4
  107.  
  108. 1.4400 1.1885 0.5218 -0.3272
  109.  
  110. Columns 5 through 8
  111.  
  112. -1.0618 -1.4256 -1.2913 -0.7060
  113.  
  114. Columns 9 through 11
  115.  
  116. 0.1260 0.9140 1.3826
  117.  
  118.  
  119. ans =
  120.  
  121. 0 4.0000 1.4400
  122. 1.0000 2.1612 1.1885
  123. 2.0000 -1.6646 0.5218
  124. 3.0000 -3.9600 -0.3272
  125. 4.0000 -2.6146 -1.0618
  126. 5.0000 1.1346 -1.4256
  127. 6.0000 3.8407 -1.2913
  128. 7.0000 3.0156 -0.7060
  129. 8.0000 -0.5820 0.1260
  130. 9.0000 -3.6445 0.9140
  131. 10.0000 -3.3563 1.3826
  132.  
  133. EDU>> %question 3.13
  134. distance=120;
  135. min_angle=27;
  136. max_angle=33;
  137. max_height=distance*atan(max_angle)
  138. min_height=distance*atan(min_angle)
  139.  
  140. max_height =
  141.  
  142. 184.8603
  143.  
  144.  
  145. min_height =
  146.  
  147. 184.0531
  148.  
  149. EDU>> %question 3.14
  150. %a
  151. new_distance=20;
  152. new_height=200;
  153. new_angle=atan(new_height/new_distance)*180/pi
  154. %b
  155. c_suqared=(new_distance^2+new_height^2);
  156. distance_to_top = sqrt(c_suqared)
  157.  
  158. new_angle =
  159.  
  160. 84.2894
  161.  
  162.  
  163. distance_to_top =
  164.  
  165. 200.9975
  166.  
  167. EDU>>
  168. EDU>> %question 3.15
  169. tc1=[84.3,86.4,85.2,87.1,83.5,84.8,85.0,85.3,85.3,85.2,82.3,84.7,83.6]
  170. tc2=[90,89.5,88.6,88.9,88.9,90.4,89.3,89.5,88.9,89.1,89.5,89.4,89.8]
  171. tc3=[86.7,87.6,88.3,85.3,80.3,82.4,83.4,85.4,86.3,85.3,89,87.3,87.2]
  172. datatable=[thermocouple1;thermocouple2;thermocouple3]'
  173.  
  174. tc1 =
  175.  
  176. Columns 1 through 4
  177.  
  178. 84.3000 86.4000 85.2000 87.1000
  179.  
  180. Columns 5 through 8
  181.  
  182. 83.5000 84.8000 85.0000 85.3000
  183.  
  184. Columns 9 through 12
  185.  
  186. 85.3000 85.2000 82.3000 84.7000
  187.  
  188. Column 13
  189.  
  190. 83.6000
  191.  
  192.  
  193. tc2 =
  194.  
  195. Columns 1 through 4
  196.  
  197. 90.0000 89.5000 88.6000 88.9000
  198.  
  199. Columns 5 through 8
  200.  
  201. 88.9000 90.4000 89.3000 89.5000
  202.  
  203. Columns 9 through 12
  204.  
  205. 88.9000 89.1000 89.5000 89.4000
  206.  
  207. Column 13
  208.  
  209. 89.8000
  210.  
  211.  
  212. tc3 =
  213.  
  214. Columns 1 through 4
  215.  
  216. 86.7000 87.6000 88.3000 85.3000
  217.  
  218. Columns 5 through 8
  219.  
  220. 80.3000 82.4000 83.4000 85.4000
  221.  
  222. Columns 9 through 12
  223.  
  224. 86.3000 85.3000 89.0000 87.3000
  225.  
  226. Column 13
  227.  
  228. 87.2000
  229.  
  230.  
  231. table =
  232.  
  233. 84.3000 90.0000 86.7000
  234. 86.4000 89.5000 87.6000
  235. 85.2000 88.6000 88.3000
  236. 87.1000 88.9000 85.3000
  237. 83.5000 88.9000 80.3000
  238. 84.8000 90.4000 82.4000
  239. 85.0000 89.3000 83.4000
  240. 85.3000 89.5000 85.4000
  241. 85.3000 88.9000 86.3000
  242. 85.2000 89.1000 85.3000
  243. 82.3000 89.5000 89.0000
  244. 84.7000 89.4000 87.3000
  245. 83.6000 89.8000 87.2000
  246.  
  247. EDU>> max(table)
  248.  
  249. ans =
  250.  
  251. 87.1000 90.4000 89.0000
  252.  
  253. EDU>> min(table)
  254.  
  255. ans =
  256.  
  257. 82.3000 88.6000 80.3000
  258.  
  259. Too many places to mark where John helped, I was fairly lost on this assignment, re-reading the texts and trying this again at home.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement