[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
liboctave: mpower operator for "Matrix"?
From: 
John W. Eaton 
Subject: 
liboctave: mpower operator for "Matrix"? 
Date: 
Thu, 9 Sep 2010 12:02:09 0400 
On 9Sep2010, Lukas Reichlin wrote:
 Maybe I'm just blind, but I couldn't find an mpower operator for Matrix^int
(int >= 0) in liboctave documentation. I was unable to figure it out from DEFUN
mpower and there must be another way than feval ("mpower", ...) ?

 Thanks for every help and best regards,
 Lukas

 PS: I'd like to calculate
 gain = c * a^(n1nu) * b;
 inside this octfile:

http://octave.svn.sourceforge.net/viewvc/octave/trunk/octaveforge/main/control/src/slab08nd.cc
There isn't one because the Octave interpreter does not need an
mpower operator that only works with ints. Since mpower can return
results that are complex or real, an octave_value object is needed to
store the result and the operators are defined in liboctinterp. See
src/xpow.cc.
jwe