summaryrefslogtreecommitdiff
path: root/solution_stability.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2013-03-31 22:35:49 -0400
committerMatt Argao <mcargao@email.wm.edu>2013-03-31 22:35:49 -0400
commit4d08c162d5ce4ac8b7eaeb9d985bfef62c886e99 (patch)
tree45733367770ddc4585faa09976b403a858d5d8e5 /solution_stability.m
parent2f3d161985ae2e57ed966981e58eb117d3a49c71 (diff)
downloadmode_match-3.0.tar.gz
mode_match-3.0.zip
Added descriptions to each function.v3.0
Diffstat (limited to 'solution_stability.m')
-rw-r--r--solution_stability.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/solution_stability.m b/solution_stability.m
index 324621f..359335c 100644
--- a/solution_stability.m
+++ b/solution_stability.m
@@ -1,12 +1,13 @@
-function [ hist_h, hist_x ] = solution_stability( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda, n_hist )
-%SOLUTION_STABILITY Summary of this function goes here
-% Detailed explanation goes here
+function [ hist_h, hist_x ] = solution_stability( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda, n_hist, self_flag )
+%Plots histogram of n_hist number of sample points
+%Area under plot is equal to the stability of the solution.
+
lens_displacement = 10^-3;
x = lens_displacement*randn(n_hist,3);
for i=1:n_hist
xd= x(i,:);
- fitness_array(i) = fitness( q_0, q_final, x_final, optics_positions + xd, optics_focal_length, lambda );
+ fitness_array(i) = fitness( q_0, q_final, x_final, optics_positions + xd, optics_focal_length, lambda, self_flag );
end
[hist_h, hist_x] = hist(fitness_array,100);