Advertisement
Guest User

interp_simetrico

a guest
Oct 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.85 KB | None | 0 0
  1.  
  2. x_up = [1.000000
  3. 0.995720
  4. 0.982960
  5. 0.961940
  6. 0.933010
  7. 0.896680
  8. 0.853550
  9. 0.804380
  10. 0.750000
  11. 0.691340
  12. 0.629410
  13. 0.565260
  14. 0.500000
  15. 0.434740
  16. 0.370590
  17. 0.339280
  18. 0.308660
  19. 0.278860
  20. 0.250000
  21. 0.222210
  22. 0.195620
  23. 0.170330
  24. 0.146450
  25. 0.124080
  26. 0.103320
  27. 0.084270
  28. 0.066990
  29. 0.051560
  30. 0.038060
  31. 0.026530
  32. 0.017040
  33. 0.009610
  34. 0.004280
  35. 0.001070
  36. 0.000000];
  37.  
  38. x_down = [0.000000
  39. 0.001070
  40. 0.004280
  41. 0.009610
  42. 0.017040
  43. 0.026530
  44. 0.038060
  45. 0.051560
  46. 0.066990
  47. 0.084270
  48. 0.103320
  49. 0.124080
  50. 0.146450
  51. 0.170330
  52. 0.195620
  53. 0.222210
  54. 0.250000
  55. 0.278860
  56. 0.308660
  57. 0.339280
  58. 0.370590
  59. 0.434740
  60. 0.500000
  61. 0.565260
  62. 0.629410
  63. 0.691340
  64. 0.750000
  65. 0.804380
  66. 0.853550
  67. 0.896680
  68. 0.933010
  69. 0.961940
  70. 0.982960
  71. 0.995720
  72. 1.000000];
  73.  
  74. y_up = [0.000000
  75. 0.000570
  76. 0.002180
  77. 0.004630
  78. 0.007700
  79. 0.011270
  80. 0.015220
  81. 0.019450
  82. 0.023840
  83. 0.028230
  84. 0.032470
  85. 0.036380
  86. 0.039780
  87. 0.042480
  88. 0.044310
  89. 0.044840
  90. 0.045090
  91. 0.045040
  92. 0.044660
  93. 0.043970
  94. 0.042950
  95. 0.041610
  96. 0.039940
  97. 0.037950
  98. 0.035640
  99. 0.033050
  100. 0.030230
  101. 0.027200
  102. 0.023950
  103. 0.020390
  104. 0.016460
  105. 0.012140
  106. 0.007670
  107. 0.003490
  108. 0.000000];
  109.  
  110. y_down = [ 0.000000
  111. -0.003490
  112. -0.007670
  113. -0.012140
  114. -0.016460
  115. -0.020390
  116. -0.023950
  117. -0.027200
  118. -0.030230
  119. -0.033050
  120. -0.035640
  121. -0.037950
  122. -0.039940
  123. -0.041610
  124. -0.042950
  125. -0.043970
  126. -0.044660
  127. -0.045040
  128. -0.045090
  129. -0.044840
  130. -0.044310
  131. -0.042480
  132. -0.039780
  133. -0.036380
  134. -0.032470
  135. -0.028230
  136. -0.023840
  137. -0.019450
  138. -0.015220
  139. -0.011270
  140. -0.007700
  141. -0.004630
  142. -0.002180
  143. -0.000570
  144.  0.000000];
  145.  
  146. plot(x_up,y_up,'p');
  147. hold on
  148. plot(x_down,y_down,'p')
  149. hold on
  150.  
  151. x2_up = 1:-0.01:0;
  152. x2_down = 0:0.01:1;
  153.  
  154.  
  155. V_up = interp1(x_up,y_up,x2_up);
  156. plot(x2_up,V_up, 'o');
  157. V_down = interp1(x_down,y_down,x2_down);
  158. plot(x2_down,V_down, 'o');
  159.  
  160. V_down_inv = fliplr(V_down);
  161. V = 0.5.*(V_up + V_down_inv);
  162.  
  163. plot(x2_up,V);
  164.  
  165. reference = [0.0 0.0
  166.     1.0 0.0];
  167. plot(reference(:,1),reference(:,2),'k')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement