pd=[0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 ];

step80=[0.106 0.605 1.493 2.34 2.692 3.178 3.618 4.166 5.33 5.865 6.59 7.114 7.893 8.318 9.25 9.421 10.734 11.113 11.495 12.03 13 13.211 13.885 14.054 14.813 15.376 15.53 15.752 16.337 16.374 16.693 16.968 17.165 17.563 17.406 17.463 17.481 17.523 17.344 17.461 17.349 17.258 17.123 16.972 16.809 16.57 16.356 16.144 15.939 15.685 15.548 15.336 15.108 14.956 14.647 14.402 14.076 13.803 13.424 13.095 12.689 12.323 11.806 11.361 10.871 10.281 9.639 9.099 8.52 7.895 7.156 6.756 6.268 5.713 5.259 4.657 4.14 3.543 3.221 2.802 2.391 1.979 1.584 1.237 0.867 0.678 0.389 0.146 0.048 -0.021 0.022 ];

step70=[-0.345 0.555 1.051 1.676 2.011 2.593 3.452 3.872 4.137 4.891 5.169 5.604 6.235 6.683 7.047 7.701 8.323 8.77 9.093 9.564 9.907 10.358 10.573 11.148 11.211 11.575 11.703 12.137 12.211 12.38 12.657 12.781 12.918 12.984 12.94 12.993 13.028 12.86 12.845 12.834 12.771 12.644 12.597 12.582 12.471 12.314 12.199 12.042 11.95 11.822 11.701 11.593 11.506 11.41 11.212 10.991 10.77 10.549 10.291 10 9.72 9.331 9.013 8.605 8.171 7.787 7.385 6.994 6.589 6.176 5.693 5.354 4.957 4.56 4.137 3.781 3.403 2.86 2.544 2.277 1.966 1.644 1.29 0.957 0.646 0.433 0.31 0.144 -0.001 -0.021 -0.01 ];

step60=[0.033 0.306 0.584 0.839 1.316 1.824 1.99 2.351 2.88 3.178 3.437 3.977 4.224 4.717 4.887 5.375 5.431 5.972 6.109 6.596 6.735 6.996 7.291 7.526 7.655 7.876 8.029 8.143 8.285 8.367 8.58 8.604 8.757 8.84 8.895 8.902 8.893 8.99 8.974 9.023 9.075 9.024 9.061 9.083 9.026 8.984 8.894 8.818 8.754 8.733 8.626 8.502 8.414 8.293 8.132 7.968 7.777 7.595 7.397 7.174 6.981 6.755 6.512 6.298 6.031 5.767 5.479 5.246 4.957 4.65 4.274 4.044 3.751 3.49 3.216 2.902 2.613 2.186 1.977 1.753 1.487 1.234 0.999 0.672 0.496 0.374 0.228 0.075 0.024 -0.014 0.001 ];

step50=[-0.033 0.271 0.386 0.553 0.732 0.911 1.216 1.31 1.722 1.783 2.087 2.278 2.536 2.659 3.013 3.151 3.212 3.488 3.684 3.936 4.195 4.326 4.445 4.692 4.826 4.979 5.139 5.342 5.415 5.524 5.677 5.72 5.807 5.865 5.937 5.984 6.007 6.014 6.02 6.041 6.074 6.089 6.082 6.094 6.079 6.062 5.993 5.951 5.907 5.856 5.795 5.726 5.678 5.63 5.539 5.439 5.31 5.204 5.082 4.95 4.818 4.686 4.521 4.386 4.211 4.047 3.877 3.702 3.515 3.33 3.053 2.897 2.691 2.506 2.301 2.109 1.885 1.565 1.431 1.227 1.058 0.89 0.708 0.415 0.345 0.227 0.135 0.055 0.006 -0.012 0.014 ];

step40=[-0.015 0.086 0.212 0.23 0.374 0.533 0.608 0.741 0.776 0.929 0.994 1.14 1.286 1.393 1.495 1.638 1.752 1.863 1.956 2.058 2.201 2.294 2.441 2.528 2.621 2.697 2.786 2.857 2.928 3.013 3.074 3.171 3.255 3.324 3.361 3.39 3.444 3.466 3.51 3.552 3.557 3.587 3.606 3.641 3.665 3.642 3.637 3.632 3.607 3.585 3.576 3.553 3.522 3.505 3.479 3.41 3.349 3.294 3.226 3.155 3.082 3.012 2.895 2.821 2.72 2.619 2.512 2.405 2.3 2.142 1.991 1.889 1.762 1.642 1.511 1.372 1.185 1.011 0.915 0.784 0.669 0.539 0.418 0.232 0.198 0.133 0.072 0.028 0.006 -0.001 0 ];

step30=[0.005 0.015 0.058 0.093 0.143 0.18 0.211 0.258 0.306 0.345 0.4 0.446 0.497 0.562 0.609 0.654 0.707 0.763 0.824 0.896 0.951 1.009 1.067 1.106 1.154 1.219 1.271 1.329 1.367 1.411 1.467 1.522 1.563 1.602 1.649 1.685 1.7 1.74 1.778 1.799 1.827 1.847 1.877 1.898 1.918 1.922 1.924 1.938 1.931 1.935 1.939 1.937 1.917 1.912 1.902 1.888 1.857 1.828 1.793 1.768 1.73 1.659 1.619 1.589 1.532 1.485 1.426 1.36 1.293 1.165 1.115 1.061 0.988 0.918 0.839 0.748 0.595 0.549 0.488 0.42 0.349 0.276 0.16 0.124 0.096 0.064 0.035 0.014 -0.002 -0.004 0.001 ];

step20=[0.002 0.005 0.007 0.026 0.04 0.053 0.062 0.063 0.092 0.101 0.123 0.124 0.138 0.171 0.196 0.216 0.219 0.259 0.276 0.303 0.319 0.341 0.357 0.381 0.411 0.432 0.461 0.478 0.503 0.518 0.548 0.58 0.583 0.617 0.637 0.65 0.673 0.687 0.704 0.729 0.736 0.76 0.768 0.774 0.793 0.797 0.807 0.814 0.815 0.827 0.83 0.822 0.815 0.822 0.823 0.818 0.802 0.794 0.785 0.764 0.728 0.709 0.699 0.692 0.666 0.642 0.615 0.571 0.506 0.481 0.475 0.45 0.41 0.374 0.319 0.255 0.228 0.219 0.192 0.159 0.121 0.071 0.05 0.046 0.038 0.024 0.01 0.001 -0.001 -0.001 -0.001 ];

step10=[0.005 -0 -0.001 0.005 0.005 0.007 0.012 0.013 0.018 0.016 0.019 0.02 0.027 0.031 0.037 0.043 0.047 0.047 0.057 0.06 0.059 0.064 0.073 0.076 0.088 0.089 0.095 0.1 0.108 0.115 0.119 0.118 0.129 0.134 0.139 0.147 0.152 0.157 0.163 0.161 0.161 0.169 0.173 0.175 0.181 0.185 0.186 0.184 0.184 0.179 0.178 0.184 0.184 0.185 0.186 0.183 0.173 0.162 0.158 0.154 0.152 0.153 0.154 0.144 0.128 0.114 0.105 0.102 0.098 0.096 0.091 0.072 0.058 0.05 0.046 0.043 0.037 0.031 0.02 0.013 0.011 0.009 0.007 0.006 0.003 0.001 0 0.001 -0 0 -0 ];

plot(pd,step80,'-',pd,step70,'-',pd,step60,'-',pd,step50,'-',pd,step40,'-', pd,step30,'-', pd,step20,'-',pd,step10,'-');
legend('A=80','A=70','A=60','A=50','A=40', 'A=30', 'A=20', 'A=10');
title('Step vs Phase difference for diferent amplitudes');
xlabel('Phase difference (degrees)');
ylabel('Step (mm)');
axis([0 180 0 18]);
grid on;
