diff options
-rw-r--r-- | abcd_free_space.m | 2 | ||||
-rw-r--r-- | abcd_lens.m | 2 | ||||
-rw-r--r-- | gbeam_propagation.m | 2 | ||||
-rw-r--r-- | gbeam_propagation_froward_only.m | 8 | ||||
-rw-r--r-- | q2wr.m | 2 | ||||
-rw-r--r-- | q_after_abcd.m | 2 | ||||
-rw-r--r-- | wr2q.m | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/abcd_free_space.m b/abcd_free_space.m index e6af144..d7b5952 100644 --- a/abcd_free_space.m +++ b/abcd_free_space.m @@ -1,6 +1,6 @@ function fs_abcd = abcd_free_space( distance) % abcd matrix for the free space region of given distance fs_abcd=[1, distance; 0,1]; -endfunction +end diff --git a/abcd_lens.m b/abcd_lens.m index 55c23bd..dcc34ff 100644 --- a/abcd_lens.m +++ b/abcd_lens.m @@ -1,6 +1,6 @@ function lens_abcd =abcd_lens(focal_distance) % abcd matrix of the lens with given focal length lens_abcd = [1, 0; -1/focal_distance, 1]; -endfunction +end diff --git a/gbeam_propagation.m b/gbeam_propagation.m index 2831880..71fcb74 100644 --- a/gbeam_propagation.m +++ b/gbeam_propagation.m @@ -45,7 +45,7 @@ function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements) q(x_pos<x_in) = fliplr(q_backw); end -endfunction +end %!test %! lambda= 1.064E-6 ; 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 @@ -2,6 +2,6 @@ function [waste,radius] =q2wr(q, lambda) % convert Gaussian beam q parameter to waste and radius waste=sqrt (-lambda./pi./imag(1./q)); radius=(1./real(1./q)); -endfunction +end diff --git a/q_after_abcd.m b/q_after_abcd.m index fd1f905..7022f52 100644 --- a/q_after_abcd.m +++ b/q_after_abcd.m @@ -1,6 +1,6 @@ function qnew=q_after_abcd(q_old,abcd) % calculates q parameter after propagating through element with given abcd matrix qnew=(q_old*abcd(1,1)+abcd(1,2))/(q_old*abcd(2,1)+abcd(2,2)); -endfunction +end @@ -1,5 +1,5 @@ function q=wr2q(waste,R,lambda) % convert Gaussian beam waste and radius to q parameter q=1./(1./R-1i.*lambda./pi./(waste.^2)); -endfunction +end |