Mercurial > repos > public > sbplib
diff +noname/animate.m @ 305:dfa4455033db feature/beams
Made opt more useful.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 12 Sep 2016 14:08:27 +0200 |
parents | 08d7bb7c8ac4 |
children | 0da1c913a611 |
line wrap: on
line diff
--- a/+noname/animate.m Mon Sep 12 14:08:06 2016 +0200 +++ b/+noname/animate.m Mon Sep 12 14:08:27 2016 +0200 @@ -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