help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sum Row In Matrix


From: turbofib
Subject: Sum Row In Matrix
Date: Thu, 9 May 2019 07:42:13 -0500 (CDT)

hi,i've this code:

for i=1:columns(dailyprofit) 
for ii=1:rows(dailyprofit) 
   if i>1 
     EqLong(ii,i)=EqLong(ii,i-1)+dailyprofitLong(ii,i);
     EqShort(ii,i)=EqShort(ii,i-1)+dailyprofitShort(ii,i);
     EqTot(ii,i)=EqTot(ii,i-1)+dailyprofit(ii,i);
     EqTotCheck(ii,i)=EqLong(ii,i)+EqShort(ii,i);
   endif
endfor  
endfor

it's possible to vectorization it?   (to use the fast calc matrix to solve
it)



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]