function [] = plot_states(t, x, t2, x2)
labels = ["v_y", "p", "r", "\phi", "\psi", "\delta_a", "\delta_r"];
figure
for i=1:size(x,2)
    subplot(size(x,2), 1,i)
    plot(t,x(:,i), 'LineWidth', 1)
    ylabel(labels(i));
    if i == size(x,2)
        xlabel('t')
    end
    hold on; plot(t2,x2(:,i), '--', 'LineWidth', 1); hold off
end
end
