diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-03-20 16:53:39 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-03-20 16:53:39 -0400 |
commit | 99f39dc1423adc360a04344689a83d2f788aae33 (patch) | |
tree | 2731d3687b663d27fad56d97c3e20fe05a5949f9 /gbeam_propagation.m | |
parent | 4943c1cb5d453dd08aab0ec7000f094779178c94 (diff) | |
download | mode_match-99f39dc1423adc360a04344689a83d2f788aae33.tar.gz mode_match-99f39dc1423adc360a04344689a83d2f788aae33.zip |
Matt's changes to use faster beam propagator
Diffstat (limited to 'gbeam_propagation.m')
-rw-r--r-- | gbeam_propagation.m | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gbeam_propagation.m b/gbeam_propagation.m index 585048d..d81f70e 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,10 +45,8 @@ 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<x_in) = fliplr(q_backw); - end + end - - end %!test |