summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-04-14 09:50:07 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2011-04-14 09:50:07 -0400
commitba5d9814e966366813f4e4ff17b53ac2acbe6140 (patch)
tree8cd7ee6fb0e0244b3155d9e20e3d648442314846
parentbb84d84867c98e4aabc2347d5679274cd1726f59 (diff)
downloadmode_match-ba5d9814e966366813f4e4ff17b53ac2acbe6140.tar.gz
mode_match-ba5d9814e966366813f4e4ff17b53ac2acbe6140.zip
functions renaming
Ignore-this: 4e669d0ac302a7facd77ca9e2af7980 darcs-hash:20110414135007-067c0-b5f911dc26595c4f6c7cb884c7e8ade9ccf65262
-rw-r--r--abcd.m2
-rw-r--r--solution_visualization.m9
2 files changed, 6 insertions, 5 deletions
diff --git a/abcd.m b/abcd.m
index 4b4739e..466dd24 100644
--- a/abcd.m
+++ b/abcd.m
@@ -39,7 +39,7 @@ function [waste,radius] =q2wr(q, lambda)
endfunction
-function q=waste_r2q(waste,R,lambda)
+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
diff --git a/solution_visualization.m b/solution_visualization.m
index f5d69d4..b26e13c 100644
--- a/solution_visualization.m
+++ b/solution_visualization.m
@@ -1,14 +1,14 @@
source('answ.txt');
-q0=waste_r2q(w0,r0,lambda);
+q0=wr2q(w0,r0,lambda);
x=linspace(x0,xf,1000); % we will calculate beam profile between x0 and xf
printf('======== Forward propagation ======\n')
q_forward=gbeam_propagation(x,q0,x0,optics);
[w_forward,r_forward]=q2wr(q_forward, lambda);
printf('======== Backward propagation =====\n')
-q_backward0=waste_r2q(wf,rf,lambda);
+q_backward0=wr2q(wf,rf,lambda);
q_backward=gbeam_propagation(x,q_backward0,xf,optics);
[w_backward,r_backward]=q2wr(q_backward, lambda);
@@ -27,7 +27,8 @@ rf
xf
printf('======= after propagation ========\n')
printf('values below should match wf and rf: \n')
-waste_at_the_end = q2waste(q_forward(end), lambda)
-radius_at_the_end = q2radius(q_forward(end),lambda)
+[waste_at_the_end,radius_at_the_end] = q2wr(q_forward(end), lambda);
+waste_at_the_end
+radius_at_the_end