step=[-0.004 0.005 0.008 0.001 -0.094 -0.219 -0.367 -0.503 -0.689 -0.859 -1.039 -1.232 -1.432 -1.664 -1.868 -2.062 -2.261 -2.442 -2.654 -2.858 -3.082 -3.295 -3.462 -3.643 -3.803 -3.971 -4.145 -4.312 -4.507 -4.63 -4.765 -4.902 -5.028 -5.148 -5.253 -5.374 -5.465 -5.565 -5.639 -5.717 -5.766 -5.83 -5.912 -5.943 -5.979 -5.994 -5.955 -5.998 -6.008 -6.021 -6.02 -5.994 -6.013 -5.964 -5.959 -5.854 -5.714 -5.707 -5.657 -5.588 -5.536 -5.44 -5.365 -5.248 -5.07 -4.939 -4.779 -4.509 -4.453 -4.184 -4.072 -3.832 -3.639 -3.498 -3.265 -3.173 -2.908 -2.716 -2.466 -2.283 -2.043 -1.784 -1.696 -1.353 -1.154 -0.883 -0.676 -0.405 -0.403 -0.123 0.051 0.246 0.325 0.61 0.647 0.976 1.14 1.382 1.603 1.813 2.06 2.232 2.489 2.724 2.919 3.118 3.321 3.482 3.748 3.969 4.168 4.362 4.555 4.712 4.786 4.989 5.139 5.306 5.426 5.517 5.613 5.728 5.802 5.894 5.919 5.967 6.005 5.999 6.041 6.038 6.045 6.069 6.061 6.094 6.095 6.05 6.016 5.972 5.901 5.845 5.794 5.738 5.682 5.623 5.541 5.424 5.313 5.21 5.091 4.952 4.817 4.696 4.515 4.386 4.209 4.047 3.883 3.704 3.519 3.308 3.062 2.899 2.691 2.503 2.319 2.107 1.893 1.554 1.434 1.234 1.062 0.87 0.692 0.42 0.333 0.233 0.134 0.064 0.002 0.006 -0.005 ];

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

plot(pd,step,'-');
grid on;
axis([-180 180 -6.5 6.5]);
xlabel('Phase difference (degrees)');
ylabel('Step (mm)');
title('Step vs phase difference');
grid on;
pause;
