WU-UAV-LiKang
/
consensus-formation-control--------Distributed-Consensus-based-Formation-Control-of-Quadrotor
Public
forked from j-petit/consensus-formation-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_matlab2tikz_wenigerlemente2.m
36 lines (31 loc) · 985 Bytes
/
plot_matlab2tikz_wenigerlemente2.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
% plots maximum accleration graph and takes into account that too many data
% points are generated
figure;
plot(max_veloc.time(1:30:end),max_veloc.data(1:30:end,:));
xlabel('Time (seconds)');
ylabel('Velocity (m/s)');
legend('v_{x}','v_{y}','v_{z}');
title('');
matlab2tikz('max_veloc_sim.tikz','width','.7\textwidth');
figure;
plot(min_veloc.time(1:30:end),min_veloc.data(1:30:end,:));
xlabel('Time (seconds)');
ylabel('Velocity (m/s)');
legend('v_{x}','v_{y}','v_{z}');
title('');
matlab2tikz('min_veloc_sim.tikz','width','.7\textwidth');
%% two subplots in one figure
figure;
subplot(1,2,1);
plot(max_veloc.time(1:30:end),max_veloc.data(1:30:end,:));
xlabel('Time (seconds)');
ylabel('Velocity (m/s)');
legend('v_{x}','v_{y}','v_{z}');
title('');
subplot(1,2,2);
plot(min_veloc.time(1:30:end),min_veloc.data(1:30:end,:));
xlabel('Time (seconds)');
ylabel('Velocity (m/s)');
legend('v_{x}','v_{y}','v_{z}');
title('');
matlab2tikz('min_max_veloc_sim.tikz','width','\textwidth');