From 0dd6c4648c7103bb8cb01b79b3491b9e7a594cd6 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Wed, 16 Dec 2009 03:53:12 +0000 Subject: vectorization of total decay function --- useful_functions.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'useful_functions.m') 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) -- cgit v1.2.3