aboutsummaryrefslogtreecommitdiff
path: root/solution_stability.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2013-02-04 16:01:09 -0500
committerMatt Argao <mcargao@email.wm.edu>2013-02-04 16:01:09 -0500
commit8c4278397279db6644624f79179c05bc300a78da (patch)
treeaea448a41b62959c41d7f350ed8c10bf27d668e3 /solution_stability.m
parent20f24d2ec65b9c46c64b34080a72f498a95fe2bb (diff)
downloadmode_match-8c4278397279db6644624f79179c05bc300a78da.tar.gz
mode_match-8c4278397279db6644624f79179c05bc300a78da.zip
Added ability to visulize stability of lens solutions.
Diffstat (limited to 'solution_stability.m')
-rw-r--r--solution_stability.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/solution_stability.m b/solution_stability.m
new file mode 100644
index 0000000..f3363b1
--- /dev/null
+++ b/solution_stability.m
@@ -0,0 +1,15 @@
+function [ hist_h, hist_x ] = solution_stability( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda )
+%SOLUTION_STABILITY Summary of this function goes here
+% Detailed explanation goes here
+n = 10000;
+lens_displacement = 10^-3;
+x = lens_displacement*randn(n,3);
+
+for i=1:n
+ xd= x(i,:);
+ fitness_array(i) = fitness( q_0, q_final, x_final, optics_positions + xd, optics_focal_length, lambda );
+end
+
+[hist_h, hist_x] = hist(fitness_array,100);
+end
+