From 4d08c162d5ce4ac8b7eaeb9d985bfef62c886e99 Mon Sep 17 00:00:00 2001 From: Matt Argao Date: Sun, 31 Mar 2013 22:35:49 -0400 Subject: Added descriptions to each function. --- gbeam_propagation.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gbeam_propagation.m') diff --git a/gbeam_propagation.m b/gbeam_propagation.m index d81f70e..585048d 100644 --- a/gbeam_propagation.m +++ b/gbeam_propagation.m @@ -1,4 +1,4 @@ -function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements) +function [q] = gbeam_propagation(x_pos, q_in, x_in, optics_elements) % calculate the 'q' parameter of the Gaussian beam propagating through optical % 'optics_elements' array along 'x' axis at points 'x_pos' % takes the gaussian beam with initial q_in parameter at x_in @@ -8,7 +8,7 @@ function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements) if any(x_pos >= x_in) % Forward propagation to the right of x_in - q(x_pos >= x_in) = gbeam_propagation_froward_only(x_pos(x_pos>=x_in), q_in, x_in, optics_elements); + [q(x_pos >= x_in)] = gbeam_propagation_froward_only(x_pos(x_pos>=x_in), q_in, x_in, optics_elements); end if any(x_pos < x_in) @@ -45,8 +45,10 @@ function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements) % final assignment of the backwards propagating beam % which we need to flip back q(x_pos