-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_input_diff.m
More file actions
48 lines (40 loc) · 998 Bytes
/
plot_input_diff.m
File metadata and controls
48 lines (40 loc) · 998 Bytes
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
function plot_input_diff(t1, t2, U_corr1, U_corr2, type, name1_1, name1_2, name2_1, name2_2, m1, m2)
l1 = length(U_corr1);
l2 = length(U_corr2)
t = t1;
if l1 > l2
U_corr1 = U_corr1(1:l2, :);
t = t2;
elseif l2 > l1
U_corr2 = U_corr2(1:l1, :);
t = t1;
end
tiledlayout(1,1,'Padding','tight', 'TileSpacing','compact')
nexttile
if type == 0
subplot(1,2,1);
else
subplot(2,1,1);
end
plot(t, U_corr1(:, 1) - U_corr2(:,1), 'Linewidth', 5);
xlabel('\textbf{t[s]}', 'Interpreter','latex');
ylabel([name1_1 '-' name1_2 ' [' m1 ']'], 'Interpreter','latex');
Axes = gca;
Axes.FontSize=26;
Axes.FontWeight='bold';
grid minor;
Axes.PlotBoxAspectRatio = [1 1 1];
if type == 0
subplot(1,2,2);
else
subplot(2,1,2);
end
plot(t, U_corr1(:, 2) - U_corr2(:,2), 'Linewidth', 5);
xlabel('\textbf{t[s]}', 'Interpreter','latex');
ylabel([name2_1 '-' name2_2 ' [' m2 ']'], 'Interpreter','latex');
Axes = gca;
Axes.FontSize=26;
Axes.FontWeight='bold';
grid minor;
Axes.PlotBoxAspectRatio = [1 1 1];
end