Repository navigation
Expand file tree
/
Copy pathplot_data.m
More file actions
60 lines (53 loc) · 1.39 KB
/
Copy pathplot_data.m
File metadata and controls
60 lines (53 loc) · 1.39 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
50
51
52
53
54
55
56
57
58
59
function [] = plot_data(q1_data, q2_data, q3_data, q1_data_filted, q2_data_filted, q3_data_filted, f)
figure
d_t = 1/f;
t = ((1:size(q1_data))-1)*d_t;
subplot(4,3,1)
plot(t, q1_data(:,1), t, q1_data_filted(:,1))
xlabel("t (s)");
ylabel("Angle (rad)");
subplot(4,3,4)
plot(t, q1_data(:,2), t, q1_data_filted(:,2))
xlabel("t (s)");
ylabel("Velocity (rad/s)");
subplot(4,3,7)
plot(t, q1_data(:,3), t, q1_data_filted(:,3))
xlabel("t (s)");
ylabel("Acceleration (rad/s^2)");
subplot(4,3,10)
plot(t, q1_data(:,4), t, q1_data_filted(:,4))
xlabel("t (s)");
ylabel("Effort (N*m)");
subplot(4,3,2)
plot(t, q2_data(:,1), t, q2_data_filted(:,1))
xlabel("t (s)");
ylabel("Angle (rad)");
subplot(4,3,5)
plot(t, q2_data(:,2), t, q2_data_filted(:,2))
xlabel("t (s)");
ylabel("Velocity (rad/s)");
subplot(4,3,8)
plot(t, q2_data(:,3), t, q2_data_filted(:,3))
xlabel("t (s)");
ylabel("Acceleration (rad/s^2)");
subplot(4,3,11)
plot(t, q2_data(:,4), t, q2_data_filted(:,4))
xlabel("t (s)");
ylabel("Effort (N*m)");
subplot(4,3,3)
plot(t, q3_data(:,1), t, q3_data_filted(:,1))
xlabel("t (s)");
ylabel("Angle (rad)");
subplot(4,3,6)
plot(t, q3_data(:,2), t, q3_data_filted(:,2))
xlabel("t (s)");
ylabel("Velocity (rad/s)");
subplot(4,3,9)
plot(t, q3_data(:,3), t, q3_data_filted(:,3))
xlabel("t (s)");
ylabel("Acceleration (rad/s^2)");
subplot(4,3,12)
plot(t, q3_data(:,4), t, q3_data_filted(:,4))
xlabel("t (s)");
ylabel("Effort (N*m)");
end