Mercurial > repos > public > sbplib
comparison +noname/plotSolutions.m @ 20:c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 22 Sep 2015 17:35:58 +0200 |
| parents | |
| children | b1e04c1f2b45 |
comparison
equal
deleted
inserted
replaced
| 19:1644d000c304 | 20:c7efff913935 |
|---|---|
| 1 function plotSolutions(filename, figename_prefix, plot_type) | |
| 2 default_arg('figename_prefix',[]); | |
| 3 default_arg('plot_type','plot') | |
| 4 | |
| 5 save_figures = isempty(figename_prefix); | |
| 6 | |
| 7 sf = SolutionFile(filename); | |
| 8 | |
| 9 for i = 1:length(sf.keys) | |
| 10 key = sf.keys{i}; | |
| 11 entry = sf.get(key); | |
| 12 | |
| 13 method = key.method; | |
| 14 order = key.order; | |
| 15 m = key.m; | |
| 16 T = key.T; | |
| 17 repr = entry.repr; | |
| 18 runtime = entry.runtime; | |
| 19 k = entry.k; | |
| 20 | |
| 21 discr = entry.discrHand(m,order); | |
| 22 | |
| 23 [update, hand] = discr.setupPlot(plot_type); | |
| 24 update(repr); | |
| 25 end | |
| 26 | |
| 27 end |
