summaryrefslogtreecommitdiff
path: root/abcd.m
diff options
context:
space:
mode:
Diffstat (limited to 'abcd.m')
-rw-r--r--abcd.m10
1 files changed, 3 insertions, 7 deletions
diff --git a/abcd.m b/abcd.m
index 814615c..0d9ceaa 100644
--- a/abcd.m
+++ b/abcd.m
@@ -32,19 +32,15 @@ end
function waste =q2waste(q, lambda)
- for i=1:size(q,2)
- waste(i)=sqrt (-lambda/pi/imag(1/q(i)));
- endfor
+ waste=sqrt (-lambda./pi./imag(1./q));
endfunction
function radius =q2radius(q, lambda)
- for i=1:size(q,2)
- radius(i)=(1/real(1/q(i)));
- endfor
+ radius=(1./real(1./q));
endfunction
function q=waste_r2q(waste,R,lambda)
- q=1/(1/R-I*lambda/pi/waste/waste);
+ q=1./(1./R-1i.*lambda./pi./(waste.^2));
endfunction