if true
f = 1e3;
t_step = 1/f/100;
t = [0:t_step:3/f];
A0 = 1;
B0 = 3;
a = A0*sin(2*pi*f*t);
b = B0*cos(2*pi*f*t);
plot_scale = 1;
plot_width = 6.6*plot_scale;
plot_height = 4.5*plot_scale;
plot_position_x = 7.0;
plot_position_y = 20.0;
window_title = 'Test Figure';
x_label = 'time - $t$ (ms)';
y_label = '(V)';
x_limit = [0 3];
y_limit = [-4 4];
x_tick = 2;
y_tick = 3;
x_tick = x_tick+2;
y_tick = y_tick+2;
y1_legend_entry = '$v_\mathrm{in}$';
y2_legend_entry = '$v_\mathrm{out}$';
font_size_label = 9;
font_size_legend = font_size_label;
filename = 'test_figure';
color(1,:) = [0.0000 0.4470 0.7410];
color(2,:) = [0.8500 0.3250 0.0980];
figure('Name', window_title, 'Color', 'White', 'Units', 'centimeter', 'Position', [plot_position_x plot_position_y plot_width plot_height]);
hold on;
h_y1 = plot(t*1e3, a, '-', 'Color',color(1,:), 'LineWidth',1);
h_y2 = plot(t*1e3, b, '-', 'Color',color(2,:), 'LineWidth',1);
h2_y1 = plot(t(10:10:(end-10))*1e3, a(10:10:(end-10)), 'o', 'Color',color(1,:), 'MarkerSize',2, 'MarkerFaceColor',color(1,:));
h_x_label = xlabel(x_label, 'Interpreter','latex');
h_y_label = ylabel(y_label, 'Interpreter','latex');
h_legend = legend([h_y1, h_y2], y1_legend_entry,y2_legend_entry, 'Location','NorthEast');
set(h_legend, 'Interpreter','latex');
set([h_legend, gca], 'FontSize',font_size_legend);
set([h_x_label, h_y_label, gca], 'FontSize',font_size_label);
set(gca, ...
'Box' , 'on' , ...
'BoxStyle' , 'back' , ...
'TickDir' , 'in' , ...
'TickLength' , 0.01*[1 1] , ...
'XScale' , 'linear' , ...
'YScale' , 'linear' , ...
'XLim' , x_limit , ...
'YLim' , y_limit , ...
'XTick' , linspace(x_limit(1), x_limit(2), x_tick), ...
'YTick' , linspace(y_limit(1), y_limit(2), y_tick), ...
'TickLabelInterpreter', 'latex' , ...
'XMinorTick' , 'on' , ...
'YMinorTick' , 'on' , ...
'XGrid' , 'on' , ...
'YGrid' , 'on' , ...
'XMinorGrid' , 'off' , ...
'YMinorGrid' , 'off' , ...
'GridLineStyle' , '-' , ...
'GridColor' , 0.3*[1 1 1] , ...
'GridAlpha' , 0.5 , ...
'MinorGridLineStyle' , '-' , ...
'MinorGridColor' , 0.1*[1 1 1] , ...
'MinorGridAlpha' , 0.5 , ...
'XColor' , 'k' , ...
'YColor' , 'k' , ...
'LineWidth' , 0.35 );
set(gcf, 'PaperPositionMode', 'auto');