Functions |
| | cos (a2/180 *pi) sin(a2/180 *pi) |
| | figure (1) |
| | subplot (4, 1, 1) |
| cla axis equal hold on | plot (p(:, 1), p(:, 2)) |
| | title (sprintf('Angle=%d^o', abs(a1-a2))) |
| for | plot (polyval(px, t), polyval(py, t), '.') |
| end vypocet drahy | subplot (4, 1, 2) |
| cla hold on grid on | title ('Distance') |
| | xlabel ('t') |
| | s (1)=0 |
| for | if (t~=0) deltaS |
| | s (t+1) |
| end | plot (t/100, s(t+1), '+') |
| end | subplot (4, 1, 3) |
| cla | title ('Curvature') |
| | kappa (i+1) |
| | plot (t, kappa(i+1), '+') |
| end | subplot (4, 1, 4) |
| cla | plot (s, kappa, '+') |
| | title ('Curvature on Distance') |
| | xlabel ('s') |
| for | deltaKappa (i) |
Variables |
| function | prujezd |
| return end | a1 = 60 |
| | a2 = 0 |
| | m = 1.30 |
| | p |
| | x0 = p(1,1) * distance |
| | y0 = p(1,2) * distance |
| | x1 = p(3,1) * distance |
| | y1 = p(3,2) * distance |
| | xx0 = m*(p(2,1) - p(1,1)) |
| | yy0 = m*(p(2,2) - p(1,2)) |
| | xx1 = m*(p(3,1) - p(2,1)) |
| | yy1 = m*(p(3,2) - p(2,2)) |
| | px |
| | py |
| for | t = 0:0.01:1 |
| | s = 0:1:100 |
| grid on hold on | kappa = 0:1:100 |
| for | i = 0:1:100 |
grid on hold off vytvoreni
deltaKappa | deltaKappa = 0:1:100 |
| for | deltaKK = abs(deltaKappa(i) - deltaKappa(i-1)) / (s(i) - s(i-1)) |