-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata_plot.m
42 lines (41 loc) · 888 Bytes
/
data_plot.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
% ******************************* data plots **************************** %
%% load sensor data
close all;
clearvars;
load IMU_sensors_data.mat;
%% acceleration plots
figure(1);
subplot(3,1,1);
plot(Time,Gamma(:,1));
title('Gamma_x');
subplot(3,1,2);
plot(Time,Gamma(:,2));
title('Gamma_y');
subplot(3,1,3);
plot(Time,Gamma(:,3));
title('Gamma_z');
saveas(figure(1),'gamma.png');
%% magnetic field plots
figure(2);
subplot(3,1,1);
plot(Time,Mag(:,1));
title('Mag_x');
subplot(3,1,2);
plot(Time,Mag(:,2));
title('Mag_y');
subplot(3,1,3);
plot(Time,Mag(:,3));
title('Mag_z');
saveas(figure(2),'mag.png');
%% angular rates plots
figure(3);
subplot(3,1,1);
plot(Time,Omega(:,1));
title('roll rate');
subplot(3,1,2);
plot(Time,Omega(:,2));
title('pitch rate');
subplot(3,1,3);
plot(Time,Omega(:,3));
title('yaw rate');
saveas(figure(3),'omega.png');