summaryrefslogtreecommitdiff
path: root/useful_functions.m
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2009-12-13 18:15:41 +0000
committerEugeniy Mikhailov <evgmik@gmail.com>2009-12-13 18:15:41 +0000
commitcd2b70a897ec5b7f45be9df10209f493635208d8 (patch)
tree5592894a727153fb65f9a7ea55cec94a3fd7ac68 /useful_functions.m
parentaa90a9e79403f24d96da05d81efc472df23a28c4 (diff)
downloadmulti_mode_eit-cd2b70a897ec5b7f45be9df10209f493635208d8.tar.gz
multi_mode_eit-cd2b70a897ec5b7f45be9df10209f493635208d8.zip
added function which convert frequency to its iondex in the frequency array
Diffstat (limited to 'useful_functions.m')
-rw-r--r--useful_functions.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/useful_functions.m b/useful_functions.m
index c0fdd7e..dda3d1d 100644
--- a/useful_functions.m
+++ b/useful_functions.m
@@ -202,4 +202,9 @@ function kappa=susceptibility(wi, rhoLiouville, dipole_elements, Nlevels, Nfreq)
endfor
endfunction
+function index=freq2index(freq, modulation_freq)
+% convert modulation freq to its index in the modulation_freq vector
+ index=[1:length(modulation_freq)](modulation_freq==freq);
+endfunction
+
% vim: ts=2:sw=2:fdm=indent