diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-04-13 10:39:37 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-04-13 10:39:37 -0400 |
commit | 8dc8b38794731c43e5a9a7e65174370504a9e15f (patch) | |
tree | f4e1698ad961d1d68c617c2608d7efe936dce3ec | |
parent | 03217583a032645ca1bf1722ac731ab1f0fde2df (diff) | |
download | mode_match-8dc8b38794731c43e5a9a7e65174370504a9e15f.tar.gz mode_match-8dc8b38794731c43e5a9a7e65174370504a9e15f.zip |
make matlab compatible strings and comments
Ignore-this: 523f6ffb7b8026b22f2c4546ac0afbd2
darcs-hash:20110413143937-067c0-8fcf82296a0a3a4fd5edfbe84fa01cf50e0c38a2
-rw-r--r-- | propagation.m | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/propagation.m b/propagation.m index b72cae5..35547f5 100644 --- a/propagation.m +++ b/propagation.m @@ -1,58 +1,56 @@ -source("abcd.m") +source('abcd.m') -########################################## -# an example of 'answ.txt' file -#lambda= 1.064E-6 ; -#Ltot= 1 ; -#r0= 1.0E+100 ; -#w0= 25.63e-6; -#lns1.abcd=abcd_lens( 0.25 ) ; -#lns1.x= 0.37680270021479 ; -#lns2.abcd=abcd_lens( 0.1 ) ; -#lns2.x= 0.90277021575519 ; -#rf=1e100; -#wf=25.630e-6; -########################################## -source("answ.txt") +% ######################################### +% an example of 'answ.txt' file +% lambda= 1.064E-6 ; +% Ltot= 1 ; +% r0= 1.0E+100 ; +% w0= 25.63e-6; +% lns1.abcd=abcd_lens( 0.25 ) ; +% lns1.x= 0.37680270021479 ; +% lns2.abcd=abcd_lens( 0.1 ) ; +% lns2.x= 0.90277021575519 ; +% rf=1e100; +% wf=25.630e-6; +% ######################################### +source('answ.txt') q0=waste_r2q(w0,r0,lambda); optics={lns1,lns2,lns3}; x=0:.001:Ltot; -printf("======== Forward propagation ======\n") +printf('======== Forward propagation ======\n') q1=prop(x,q0,0,optics); w1=q2waste(q1, lambda); r1=q2radius(q1,lambda); -printf("======== Backward propagation ===\n") +printf('======== Backward propagation ===\n') %because of back propagation rf=-rf; q1b=waste_r2q(wf,rf,lambda); q2b=prop(x,q1b,Ltot,optics); -printf("=================================\n") +printf('=================================\n') wb=q2waste(q2b, lambda); rb=q2radius(q2b,lambda); -plot (x,w1, "1;forward propagation;", x, wb, "2;backward propagation;", - x,-w1, "1;;", x, -wb, "2;;") +plot (x,w1, '1;forward propagation;', x, wb, '2;backward propagation;', ... + x,-w1, '1;;', x, -wb, '2;;') -printf("=================================\n") -printf("======= final check =============\n") -printf("======= after propagation ========\n") -printf("following are theoretical values: \n") +printf('=================================\n') +printf('======= final check =============\n') +printf('======= after propagation ========\n') +printf('following are theoretical values: \n') w0 r0 wf rf q0=waste_r2q(w0,r0,lambda); qtf=prop(Ltot, q0,0, optics); -printf("values below should match 'wf' and 'rf': \n") +printf('values below should match wf and rf: \n') waste = q2waste(qtf, lambda) radius = q2radius(qtf,lambda) -%pause(100) -%quit() |