diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2009-12-16 03:53:12 +0000 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2009-12-16 03:53:12 +0000 |
commit | 0dd6c4648c7103bb8cb01b79b3491b9e7a594cd6 (patch) | |
tree | cf3018af4819133034ed8bfd9ce8f82f6a2268cc /useful_functions.m | |
parent | f765eba5a1cdad219d47c0ae6bbac6739bd84215 (diff) | |
download | multi_mode_eit-0dd6c4648c7103bb8cb01b79b3491b9e7a594cd6.tar.gz multi_mode_eit-0dd6c4648c7103bb8cb01b79b3491b9e7a594cd6.zip |
vectorization of total decay function
Diffstat (limited to 'useful_functions.m')
-rw-r--r-- | useful_functions.m | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/useful_functions.m b/useful_functions.m index 913b505..b7156cf 100644 --- a/useful_functions.m +++ b/useful_functions.m @@ -2,10 +2,7 @@ function ret=decay_total(g_decay,i) % calculate total decay for particular level taking in account all branches - ret=0; - for k=1:size(g_decay)(1) - ret=ret+g_decay(i,k); - endfor + ret=sum(g_decay(i,:)); endfunction function ret=kron_delta(i,j) |