summaryrefslogtreecommitdiff
path: root/gbeam_propagation_froward_only.m
diff options
context:
space:
mode:
Diffstat (limited to 'gbeam_propagation_froward_only.m')
-rw-r--r--gbeam_propagation_froward_only.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/gbeam_propagation_froward_only.m b/gbeam_propagation_froward_only.m
index 5c7ea3a..db8877f 100644
--- a/gbeam_propagation_froward_only.m
+++ b/gbeam_propagation_froward_only.m
@@ -31,15 +31,15 @@ function q = gbeam_propagation_froward_only(x_pos, q_in, x_in, optics_elements)
q_last_calc=q_after_abcd(q_last_calc,abcd);
q_last_calc=q_after_abcd(q_last_calc,el.abcd);
x_last_calc=el.x;
- endif
- endfor
+ end
+ end
if (x_pos_i > x_last_calc);
abcd=abcd_free_space(x_pos_i-x_last_calc);
q_last_calc=q_after_abcd(q_last_calc,abcd);
x_last_calc=x_pos_i;
- endif
+ end
q(i)=q_last_calc;
- endfor
+ end
end
%!test