[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you pass two Octave functions to an .oct function?
From: |
babelproofreader |
Subject: |
Re: How do you pass two Octave functions to an .oct function? |
Date: |
Fri, 16 Oct 2009 10:00:55 -0700 (PDT) |
>I'd think these messages are pretty understandable.
>You simply can't pass a raw double * pointer (the local buffer) to
>feval, because it can't handle it. You need to create a valid
>octave_value from it. Declare rolling_vector as ColumnVector and it
>will likely work.
I have stripped my code down to the bare minimum, declared the input as
ColumnVector, and it still fails on compile. My revised code is
#include <octave/oct.h>
#include <octave/dColVector.h>
#include <octave/parse.h>
DEFUN_DLD (rollingfft, args, , "Help String")
{
octave_value_list retval;
octave_value_list fft_result_vector;
octave_value_list ifft_result_vector;
octave_value_list real_result_vector;
octave_function *fcn1 = args(0).function_value ();
// supply Octave "fft" function
octave_function *fcn2 = args(1).function_value ();
// supply Octave "ifft" function
octave_function *fcn3 = args(2).function_value ();
// supply Octave "real" function
ColumnVector input_vector = args(3).column_vector_value ();
ColumnVector output_vector = args(3).column_vector_value ();
fft_result_vector = feval( fcn1 , input_vector );
ifft_result_vector = feval( fcn2 , fft_result_vector );
real_result_vector = feval( fcn3 , ifft_result_vector );
retval = real_result_vector;
return retval;
}
and the error message is
octave:1> mkoctfile rollingfft.cc
rollingfft.cc: In function ‘octave_value_list Frollingfft(const
octave_value_list&, int)’:
rollingfft.cc:18: error: no matching function for call to
‘feval(octave_function*&, ColumnVector&)’
/usr/include/octave-3.0.1/octave/parse.h:118: note: candidates are:
octave_value_list feval(const std::string&, const octave_value_list&, int)
/usr/include/octave-3.0.1/octave/parse.h:123: note:
octave_value_list feval(octave_function*, const octave_value_list&, int)
/usr/include/octave-3.0.1/octave/parse.h:126: note:
octave_value_list feval(const octave_value_list&, int)
--
View this message in context:
http://www.nabble.com/How-do-you-pass-two-Octave-functions-to-an-.oct-function--tp25870717p25928773.html
Sent from the Octave - General mailing list archive at Nabble.com.
- How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/13
- Re: How do you pass two Octave functions to an .oct function?, Jaroslav Hajek, 2009/10/14
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/15
- Re: How do you pass two Octave functions to an .oct function?, Jaroslav Hajek, 2009/10/16
- Re: How do you pass two Octave functions to an .oct function?,
babelproofreader <=
- Re: How do you pass two Octave functions to an .oct function?, David Grundberg, 2009/10/18
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/20
- Re: How do you pass two Octave functions to an .oct function?, Jaroslav Hajek, 2009/10/20
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/21
- Re: How do you pass two Octave functions to an .oct function?, Jaroslav Hajek, 2009/10/22
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/25
- Re: How do you pass two Octave functions to an .oct function?, David Grundberg, 2009/10/25
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/26
- Re: How do you pass two Octave functions to an .oct function?, babelproofreader, 2009/10/29