Skip to content
Snippets Groups Projects
plot_sim.m 450 B
Newer Older
function plot_sim(T)
%PLOT_SIM Show movie of simulation
%% Plotting
figure(1); hold on;
for i = 1:length(T.t)
    cla; xlim([-T.a-1, -T.a+3]); ylim([0, 0.7]); 
    ax = gca;
    ax.FontSize = 16;
    xlabel('position'); ylabel('volume fraction');
    plot(T.x, T.phi_tot(T.x, T.a, T.b, T.e, T.u0), 'LineWidth', 2, 'LineStyle', '--'); 
    plot(T.x, T.sol(i, :), 'LineWidth', 2);
    shg
    pause();
%     print([num2str(i),'.png'],'-dpng')
end
end