Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Q1)
- x = [0 1 2 2 3];
- y = [1 3 3 4 5];
- t = [0 1 2 3 4];
- Rx = 0:0.001:4;
- Rt = spline(t,x, Rx);
- St = spline(t,y, Rx);
- figure
- %plot(Rx, Rt);
- %plot(Rx, St);
- plot(Rt, St);
- xlabel('x'), ylabel('t')
- grid on
- Q1b)
- x = [2.75 1.3 -0.25 0.0 0.25 -1.3 -2.5 -1.3 0.25 0.0 -0.25 1.3 2.75];
- y = [-1.0 -0.75 0.8 2.0 0.8 -0.25 0.0 0.25 -1.3 -2.5 -1.3 -0.25 -1.0];
- t = 0:12
- Rx = 0:0.001:12;
- Rt = spline(t,x, Rx);
- St = spline(t,y, Rx);
- figure
- %plot(Rx, Rt);
- %plot(Rx, St);
- plot(Rt, St);
- xlabel('x'), ylabel('t'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement