[Top][All Lists]

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

Re: [Discuss-gnuradio] complex arithmetic

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] complex arithmetic
Date: Tue, 17 Aug 2004 00:01:38 -0700
User-agent: Mutt/1.4.1i

On Tue, Aug 17, 2004 at 12:00:53AM -0500, David Carr wrote:
> Why does this die with:
> gr_complex_mag.cc: In member function `virtual int gr_complex_mag::work(int,
>   gr_vector_const_void_star&, gr_vector_void_star&)':
> gr_complex_mag.cc:55: error: `cabs' undeclared (first use this function)
> I've included <complex> and I think that the cabs function should be 
> there.  The conj function works.  What am I missing?

The function you're looking for is called std::abs (...)

Also, you don't need to explicitly #include <complex>, it's included by
way of gr_block which is at the base of the inheritance hiearchy.

Looks like you're on your way!


reply via email to

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