2024-09-11 19:34:41 +02:00
|
|
|
function plot_input(t, sat, U, orient, type, in1, in2, m1, m2)
|
2024-09-07 09:43:08 +02:00
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
|
|
|
|
tiledlayout(1,1,'Padding','tight', 'TileSpacing','compact')
|
|
|
|
nexttile
|
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
if orient == 0
|
|
|
|
subplot(1,2,1);
|
|
|
|
else
|
2024-08-13 11:45:36 +02:00
|
|
|
subplot(2,1,1);
|
2024-09-07 09:43:08 +02:00
|
|
|
end
|
|
|
|
|
2024-09-11 19:34:41 +02:00
|
|
|
ylim1_ = sat(1)*2.5;
|
|
|
|
ylim2_ = sat(2)*2.5;
|
2024-09-11 15:05:20 +02:00
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
hold on
|
2024-09-11 15:05:20 +02:00
|
|
|
plot(t, U(:, 1), 'Linewidth', 6);
|
|
|
|
|
2024-09-11 19:34:41 +02:00
|
|
|
plot(t, ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--', 'Color', 'black');
|
|
|
|
plot(t, -ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--', 'Color', 'black');
|
2024-09-11 15:05:20 +02:00
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
xlabel('\textbf{t[s]}', 'Interpreter','latex');
|
2024-09-11 19:34:41 +02:00
|
|
|
ylabel(['\textbf{$$' in1 '^{' type '}$$ [' m1 ']}'], 'Interpreter','latex');
|
2024-08-13 11:45:36 +02:00
|
|
|
hold off
|
|
|
|
|
|
|
|
|
|
|
|
Axes = gca;
|
2024-09-07 09:43:08 +02:00
|
|
|
Axes.FontSize=26;
|
2024-08-13 11:45:36 +02:00
|
|
|
Axes.FontWeight='bold';
|
|
|
|
grid minor;
|
|
|
|
Axes.PlotBoxAspectRatio = [1 1 1];
|
2024-09-11 19:34:41 +02:00
|
|
|
ylim([-ylim1_, ylim1_])
|
2024-09-07 09:43:08 +02:00
|
|
|
|
|
|
|
if orient == 0
|
|
|
|
subplot(1,2,2);
|
|
|
|
else
|
2024-08-13 11:45:36 +02:00
|
|
|
subplot(2,1,2);
|
2024-09-07 09:43:08 +02:00
|
|
|
end
|
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
hold on
|
2024-09-11 15:05:20 +02:00
|
|
|
plot(t, U(:, 2), 'Linewidth', 6);
|
|
|
|
|
2024-09-11 19:34:41 +02:00
|
|
|
plot(t, ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--', 'Color', 'black');
|
|
|
|
plot(t, -ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--', 'Color', 'black');
|
2024-09-11 15:05:20 +02:00
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
xlabel('\textbf{t[s]}', 'Interpreter','latex');
|
2024-09-11 19:34:41 +02:00
|
|
|
ylabel(['\textbf{$$' in2 '^{' type '}$$ [' m2 ']}'], 'Interpreter','latex');
|
2024-08-13 11:45:36 +02:00
|
|
|
hold off
|
|
|
|
|
|
|
|
Axes = gca;
|
2024-09-07 09:43:08 +02:00
|
|
|
Axes.FontSize=26;
|
2024-08-13 11:45:36 +02:00
|
|
|
Axes.FontWeight='bold';
|
|
|
|
grid minor;
|
|
|
|
Axes.PlotBoxAspectRatio = [1 1 1];
|
2024-09-11 19:34:41 +02:00
|
|
|
ylim([-ylim2_, ylim2_])
|
2024-09-11 15:05:20 +02:00
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
end
|