Mercurial > repos > public > sbplib
diff +noname/animate.m @ 425:e56dbd9e4196 feature/grids
Merge feature/beams
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 07 Feb 2017 16:09:02 +0100 |
parents | dfa4455033db |
children | 0da1c913a611 |
line wrap: on
line diff
--- a/+noname/animate.m Tue Feb 07 15:47:51 2017 +0100 +++ b/+noname/animate.m Tue Feb 07 16:09:02 2017 +0100 @@ -5,10 +5,14 @@ % noname.animate(discr,1, [tstart tend],'my_mov', opt) function hand = animate(discretization, time_modifier, Tend, dirname, opt) - default_arg('time_modifier',1); + default_arg('time_modifier', 1); default_arg('Tend', Inf); - default_arg('dirname',''); - default_arg('opt', []); + default_arg('dirname', ''); + + optDefault.plotType = 'animation'; + optDefault.time = []; + + default_struct('opt', optDefault); if time_modifier < 0 @@ -34,7 +38,7 @@ fprintf('m : %d\n',size(discretization)); - ts = discretization.getTimestepper(opt); + ts = discretization.getTimestepper(opt.time); if numel(Tend) == 2 Tstart = Tend(1); @@ -50,7 +54,7 @@ Tstart = start_solution.t; end - [update, figure_handle] = discretization.setupPlot('animation'); + [update, figure_handle] = discretization.setupPlot(opt.plotType); if makemovies save_frame = anim.setup_fig_mov(figure_handle,dirname); end