aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-04-13 23:42:26 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2011-04-13 23:42:26 -0400
commit9d50df730d0ecd7c13d5c1a35bcca91f3a60a3f8 (patch)
treef13f5de299eac3ca1cf4ed3663808aa75f1a9ef1
parentfce6c449e1f774db68e35b3e34acb0f23ff65b57 (diff)
downloadmode_match-9d50df730d0ecd7c13d5c1a35bcca91f3a60a3f8.tar.gz
mode_match-9d50df730d0ecd7c13d5c1a35bcca91f3a60a3f8.zip
vector form for several functions
Ignore-this: b717a2047dd2ab6fe633b6f828eb3d8c darcs-hash:20110414034226-067c0-d1fa772198ad34611393c9931aa88edf4320150d
-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