search for: diaganol

Displaying 1 result from an estimated 1 matches for "diaganol".

2013 Jan 23
2
setting off-diagonals to zero
The following 1460 x 1460 matrix can be throught of as 16 distinct 365 x 365 matrices. I'm trying to set off-diaganol terms in the 16 sub-matrices with indices more than +/- 5 (days) from each other to zero using some for loops. This works well for some, but not all, of the for loops. The R code I"m using follows. For some reason the third loop below zero's-out everything in the sub-quadrant it is targ...