iteration - Iterative sum and multiplication product in matlab -


lets have starting value,multiplication value , array. want calculate sum , multiplication product similar "cumsum" (i suppose need kind of iteration).

avgplusdm = zeros(1,size); avgplusdm(1) = 10; = 2:size         avgplusdm(i) = avgplusdm(i-1) + sf * ( plusdm(i) - avgplusdm(i-1) ); end; 

sf - constant, plusdm - array. need quick possible , loop slow. how else can done?


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -