help-octave
[Top][All Lists]
Advanced

[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: Thu, 29 Oct 2009 06:28:10 -0700 (PDT)

>I compiled the code in stages and so I am sure that it is the filter code
that is the problem

The problem seems to be that the loop over the complex column vector output
of fft fails. The simple code below 

#include <octave/oct.h>
#include <octave/dColVector.h>
#include <octave/parse.h>
#include <math.h>

DEFUN_DLD (justchange, args, , "Help String")
{
  octave_value retval;
  ComplexColumnVector justchange_input = args(0).complex_column_vector_value
();

   for (octave_idx_type ii (0); ii < args(0).length (); ii++)
       {
       justchange_input(ii) = justchange_input(ii) * 1 ;
       }

  retval = justchange_input;

  return retval;
}

fails to compile, with error message

justchange.cc:13: error: no match for ‘operator=’ in
‘justchange_input.ComplexColumnVector::<anonymous>.MArray<std::complex<double>
>::<anonymous>.Array<T>::operator() [with T = std::complex<double>](ii) =
operator*(const octave_value&, const octave_value&)(((const octave_value&)(&
octave_value(1))))’
/usr/include/c++/4.3/complex:1224: note: candidates are:
std::complex<double>& std::complex<double>::operator=(double)
/usr/include/c++/4.3/complex:1159: note:                
std::complex<double>& std::complex<double>::operator=(const
std::complex<double>&)

and this essentially what I am trying to do.




-- 
View this message in context: 
http://www.nabble.com/How-do-you-pass-two-Octave-functions-to-an-.oct-function--tp25870717p26113056.html
Sent from the Octave - General mailing list archive at Nabble.com.




reply via email to

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