-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyPlotTheta.m
51 lines (51 loc) · 1.5 KB
/
myPlotTheta.m
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
function myPlotTheta(q_theory,q_real,F)
figure
subplot(3,2,1);
plot(q_theory(:,1),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,1),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta1');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
subplot(3,2,2);
plot(q_theory(:,2),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,2),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta2');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
subplot(3,2,3);
plot(q_theory(:,3),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,3),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta3');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
subplot(3,2,4);
plot(q_theory(:,4),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,4),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta4');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
subplot(3,2,5);
plot(q_theory(:,5),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,5),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta5');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
subplot(3,2,6);
plot(q_theory(:,6),'DisplayName','q_record','LineWidth',1.2);
hold on
plot(q_real(:,6),'DisplayName','thetalist','LineWidth',1.2);
ylabel('theta6');
xlabel('time');
title('theta');
legend('实际关节角度','理论关节角度');
end