
From:  Kai Torben Ohlhus 
Subject:  Re: Matrix like operations in a .oct file 
Date:  Sun, 6 Oct 2013 17:02:42 +0200 
<snip>
the revelant part of my code is:
Matrix price = args(0).matrix_value () ; // a single column matrix
Matrix output = args(0).matrix_value () ;
// create intermediate calculation matrices
Matrix vec_11 (1,11) ;
Matrix price_11 (11,1) ;
Matrix result (1,1) ;
for ( int ii = m ; ii < (m+1) ; ii ++ )
{
vec_11 is filled in this loop and then doesn't change
}
for ( octave_idx_type ii (50) ; ii < args(0).length () ; ii++ )
{
// extract rolling window and perform matrix multiplication
result = vec_11 * price.extract(ii10,0,ii,0) ;
output(ii,1) = result ; // this writing to output matrix fails
}
retval_list(0) = output ;
<snip>
[Prev in Thread]  Current Thread  [Next in Thread] 