Functions |
spline approximation | parameter (distance from corner to spline) approx_e |
| cos (a2/180 *pi) sin(a2/180 *pi) |
| approx_e (i) |
| figure (2) |
else | plot (polyval(px, t), polyval(py, t), '.') |
end | figure (1) |
| plot (angles, approx_e) |
grid | title ('Distance from corner to spline-approximation parameter') |
| xlabel ('Angle[deg]') |
| ylabel ('e') |
| plot (angles, my_e, 'r') |
Variables |
clear | all |
| clc |
| angles = 5:5:180 |
| m = zeros(size(angles)) |
| a1 = 0 |
| B = 4.4 |
| A = 6860 |
| distance = 1 |
for | i = 1:length(angles) |
for | a2 = angles(i) |
| 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 |
end end hold | on |
hold on | c0 = 0.892303 |
| c1 = -0.008169 |
| c2 = 1.848555E-05 |
| my_e = (c2*angles.^2 + c1*angles + c0) * distance |