[Top][All Lists]

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

Multiplication of NDArray in oct file

From: babelproofreader
Subject: Multiplication of NDArray in oct file
Date: Tue, 7 Apr 2015 15:15:10 -0700 (PDT)

I am trying to convert an m file to an oct file and part of the m file code
for hh = 1 : nt       
bi_star = bi_star + A( : , : , hh ) * data( : , : , hh + 1 )' ;

where both "A" and "data" are of NDArray type. I have tried to extract the
values from the NDArray by using something like

A.extract( 0 , 0 , num_dims-1 , num_dims-1 , hh ) ;

but get the error message "error: ‘class NDArray’ has no member named
‘extract’ " when compiling. The only other way I can think of doing this at
the moment is to put nested loops within the hh loop to loop over both "A"
and "data" to fill in intermediate calculation matrices and do the matrix
multiplications and additions using these intermediate matrices. However,
this seems to be a very long winded way of doing things. Is there a more
efficient way of accomplishing this?

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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