Mercurial > repos > public > sbplib
changeset 114:1035c190e8de
noname.animate: Updated documentation. Fixed bug with start time. Added pause before starting.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 14 Dec 2015 18:57:02 +0100 |
parents | a4e1608ae980 |
children | 1fe783681f9f |
files | +noname/animate.m |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/+noname/animate.m Fri Dec 11 09:31:46 2015 +0100 +++ b/+noname/animate.m Mon Dec 14 18:57:02 2015 +0100 @@ -1,8 +1,8 @@ -% animate(dirname,discretization,Tend, time_modifier,time_method) +% hand = animate(discretization, time_modifier, Tend, dirname, opt) % % Example: -% animate('',discr,tend) -% animate('my_mov',discr,tend,time_mod,time_method) +% animate(discr,timemodifier,tend) +% animate(discr,1, [tstart tend],'my_mov', opt) function hand = animate(discretization, time_modifier, Tend, dirname, opt) default_arg('time_modifier',1); @@ -46,8 +46,8 @@ fprintf(' - Done\n'); start_solution = discretization.getTimeSnapshot(ts); else - Tstart = 0; start_solution = discretization.getTimeSnapshot(0); + Tstart = start_solution.t; end [update, figure_handle] = discretization.setupPlot('animation'); @@ -82,6 +82,7 @@ if ~do_step + pause anim.animate(@G, Tstart, Tend, time_modifier); else while true