Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. clear all
  2. close all
  3.  
  4. t=linspace(0,10);
  5.  
  6. theta1=26.565-3.49695*t.^2 +0.23313*t.^3;
  7.  
  8. d2=sqrt(5)+0.02292*t.^2 -1.528*10^(-3)*t.^3;
  9.  
  10. theta3=-90+9*t;
  11.  
  12. figure(1)
  13. subplot(3,1,1)
  14. plot(t,theta1)
  15. grid on
  16. xlabel('t')
  17. ylabel('theta1')
  18. subplot(3,1,2)
  19. plot(t,d2)
  20. grid on
  21. xlabel('t')
  22. ylabel('d2')
  23. subplot(3,1,3)
  24. plot(t,theta3)
  25. grid on
  26. xlabel('t')
  27. ylabel('theta3')
  28. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  29.  
  30. theta1=(26.565-3.49695*t.^2 +0.23313*t.^3)*(pi/180);
  31.  
  32. d2=sqrt(5)+0.02292*t.^2 -1.528*10^(-3)*t.^3;
  33.  
  34.  
  35. x0=d2.*cos(theta1)
  36. y0=d2.*sin(theta1)
  37.  
  38. figure(2)
  39. plot(y0,x0)
  40. xlabel('y0')
  41. ylabel('x0')
  42.  
  43.  
  44. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  45. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47. clear all
  48.  
  49. t=linspace(0,5);
  50. t2=linspace(5,10);
  51. t3=linspace(0,10);
  52. theta3=-90+9*t3;
  53.  
  54. thetaf=-26.565;
  55. theta0=26.565;
  56.  
  57. a01=26.565;
  58. a11=0;
  59. a21=(3/5^2)*(thetaf-theta0) -(1/5)*(-10.62);
  60. a31=(-2/5^3)*(thetaf-theta0) +(1/5^2)*(-10.62);
  61.  
  62. a02=atand(2)-90;
  63. a12=-10.62;
  64. a22=(3/5^2)*(-90-thetaf)-(2/5)*(-10.62);
  65. a32=(-2/5^3)*(-90-thetaf)+(1/5^2)*(-10.62);
  66.  
  67. theta11=a01+a21*t.^2 +a31*t.^3;
  68. d21=sqrt(5);
  69. theta12=a02+a12*(t)+a22*(t).^2 +a32*(t).^3;
  70. d22=sqrt(5)+0.0917*(t).^2 -0.0122*(t).^3;
  71.  
  72. figure(3)
  73. subplot(3,1,1)
  74. plot(t,theta11)
  75. hold on
  76. plot(t2,theta12)
  77. grid on
  78. xlabel('t')
  79. ylabel('theta1')
  80. subplot(3,1,2)
  81. plot(t,d21);
  82. hold on
  83. plot(t2,d22)
  84. grid on
  85. xlabel('t')
  86. ylabel('d2')
  87. subplot(3,1,3)
  88. plot(t3,theta3)
  89. grid on
  90. xlabel('t')
  91. ylabel('theta3')
  92.  
  93.  
  94. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  95.  
  96. ad0=sqrt(5);
  97. ad1=0;
  98. ad2=(3/5^2)*(sqrt(9)-sqrt(5));
  99. ad3=(-2/5^3)*(sqrt(9)-sqrt(5));
  100. d22=sqrt(5)+ad2*(t2-5).^2 +ad3*(t2-5).^3;
  101.  
  102. x01=d21.*cosd(theta11);
  103. y01=d21.*sind(theta11);
  104. x02=d22.*cosd(theta12);
  105. y02=d22.*sind(theta12);
  106.  
  107. figure(4)
  108. plot(y01,x01)
  109. hold on
  110. plot(y02,x02)
  111. xlabel('y0')
  112. ylabel('x0')
  113. hold off
  114.  
  115. figure(5)
  116. plot(theta12)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement