Mercurial > repos > public > sbplib
comparison +noname/animate.m @ 69:f87003695677
Moved drawno out of plot update functions for huge performance boost.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 23 Nov 2015 13:54:01 +0100 |
parents | 9a647dcccbdd |
children | 1edee9e1ea41 |
comparison
equal
deleted
inserted
replaced
68:f9a65e62c5e5 | 69:f87003695677 |
---|---|
44 % Loop function | 44 % Loop function |
45 function next_t = G(next_t) | 45 function next_t = G(next_t) |
46 ts.evolve(next_t); | 46 ts.evolve(next_t); |
47 sol = discretization.getTimeSnapshot(ts); | 47 sol = discretization.getTimeSnapshot(ts); |
48 update(sol); | 48 update(sol); |
49 drawnow | |
49 % waitforbuttonpress | 50 % waitforbuttonpress |
50 if makemovies | 51 if makemovies |
51 save_frame(); | 52 save_frame(); |
52 end | 53 end |
53 % pause(0.1) | 54 % pause(0.1) |
61 sol = discretization.getTimeSnapshot(0); | 62 sol = discretization.getTimeSnapshot(0); |
62 update(sol); | 63 update(sol); |
63 | 64 |
64 fprintf('Using time step k = %.6f\n',ts.k) | 65 fprintf('Using time step k = %.6f\n',ts.k) |
65 fprintf('System size: %d\n',size(discretization)) | 66 fprintf('System size: %d\n',size(discretization)) |
66 waitforbuttonpress | 67 % waitforbuttonpress |
67 anim.animate(@G,0,Tend,time_modifier) | 68 anim.animate(@G,0,Tend,time_modifier) |
68 str = util.replace_string(str,''); | 69 str = util.replace_string(str,''); |
69 | 70 |
70 % if makemovies | 71 % if makemovies |
71 % fprintf('Generating movies...\n') | 72 % fprintf('Generating movies...\n') |