summaryrefslogtreecommitdiff
path: root/fitness.m
diff options
context:
space:
mode:
Diffstat (limited to 'fitness.m')
-rw-r--r--fitness.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/fitness.m b/fitness.m
index 80835e5..c92d734 100644
--- a/fitness.m
+++ b/fitness.m
@@ -1,9 +1,10 @@
-function Energy = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length )
+function [Energy, Waist] = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda )
%FITNESS Summary of this function goes here
% Detailed explanation goes here
x0 = 0;
q_f_trial = gbeam_propagation(x_final,q_0,x0,optics_placer(optics_positions, optics_focal_length));
-
+ [Waist, Radius] = q2wr(q_f_trial, lambda);
+
Energy = abs(q_final-q_f_trial);
% penalty calculation