summaryrefslogtreecommitdiff
path: root/stability_visualization.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2013-02-06 15:04:23 -0500
committerMatt Argao <mcargao@email.wm.edu>2013-02-06 15:04:23 -0500
commit83b8b9b72f2d9fe27e98e7ad2ad27d545dea9873 (patch)
treeba8e0f84c9591c68a3f73502a4a26596b5070277 /stability_visualization.m
parent8c4278397279db6644624f79179c05bc300a78da (diff)
downloadmode_match-83b8b9b72f2d9fe27e98e7ad2ad27d545dea9873.tar.gz
mode_match-83b8b9b72f2d9fe27e98e7ad2ad27d545dea9873.zip
Added subplot of solution's stability under propagation plot.
Diffstat (limited to 'stability_visualization.m')
-rw-r--r--stability_visualization.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/stability_visualization.m b/stability_visualization.m
new file mode 100644
index 0000000..86d3836
--- /dev/null
+++ b/stability_visualization.m
@@ -0,0 +1,18 @@
+function [hist_h, hist_x] = stability_visualization( possible_lens_placement_uniq, q0, qf, xf, optics_position, optics_set, lambda, n, n_hist, index )
+%STABILITY_VISUALIZATION Summary of this function goes here
+% Detailed explanation goes here
+
+n_possible_lens_placement = min(n, size(possible_lens_placement_uniq,1));
+
+for i=1:n
+ figure(i)
+ [hist_h, hist_x] = solution_stability( q0, qf, xf, optics_position(index(i),:), optics_set(index(i),:), lambda, n_hist );
+ subplot(2,1,2); plot(hist_x, hist_h);
+ area = trapz(hist_x, hist_h);
+ str_n = ['# of test points = ', num2str(n_hist)];
+ str_a = ['Area under curve = ', num2str(area)];
+ title({'Solution Stability'; str_n; str_a});
+end
+
+end
+