-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscattering_based_plot_graph.m
More file actions
49 lines (46 loc) · 1.36 KB
/
Copy pathscattering_based_plot_graph.m
File metadata and controls
49 lines (46 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
figure();
subplot(3,1,1);
hold on;
grid on;
plot(out.xd.Time(1:end), out.xd.data(1:end),'LineWidth', 1.2);
hold on, plot(out.xs.Time(1:end), out.xs.data(1:end),'LineWidth', 1.2);
hold on, plot(out.xm.Time(1:end), out.xm.data(1:end),'LineWidth', 1.2);
yline(0.8,'-','environment');
xlabel('time [s]');
ylabel('position [rad]');
legend('xd','xs','xm');
subplot(3,1,2);
hold on;
grid on;
plot(out.dot_xs.Time(1:end), out.dot_xs.data(1:end),'LineWidth', 1.2);
hold on, plot(out.dot_xm.Time(1:end), out.dot_xm.data(1:end),'LineWidth', 1.2);
xlabel('time [s]');
ylabel('velocity [rad/s]');
legend('d\_xs','d\_xm');
subplot(3,1,3);
hold on;
grid on;
plot(out.fh.Time(1:end), out.fh.data(1:end),'LineWidth', 1.2);
hold on, plot(out.fe.Time(1:end),out.fe.data(1:end),'LineWidth', 1.2);
xlabel('time [s]');
ylabel('forces [Nm]');
legend('fm', 'fs');
%%
% figure();
% subplot(2,1,1);
% hold on;
% grid on;
% hold on, plot(out.fl.Time(1:end), out.fl.data(1:end),'LineWidth', 1.2);
% hold on, plot(out.fr.Time(1:end), out.fr.data(1:end),'LineWidth', 1.2);
% xlabel('time [s]');
% ylabel('forces [Nm]');
% legend('fl','fr');
%
% subplot(2,1,2);
% hold on;
% grid on;
% plot(out.dot_xl.Time(1:end), out.dot_xl.data(1:end),'LineWidth', 1.2);
% hold on, plot(out.dot_xr.Time(1:end), out.dot_xr.data(1:end),'LineWidth', 1.2);
% xlabel('time [s]');
% ylabel('velocity [rad/s]');
% legend('d\_xl','d\_xr');