# Complex--\>real

**URL:** <https://www.ruby-forum.com/t/complex-real/160402>\
**Category:** GNU Radio\
**Created:** [February 15, 2009, 11:51pm UTC](https://www.ruby-forum.com/t/complex-real/160402 "2009-02-15T23:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [February 15, 2009, 11:51pm UTC](https://www.ruby-forum.com/t/complex-real/160402/1 "2009-02-15T23:51:11Z")

</div>

I have a complex stream that I’ve bandpass filtered so that it only  
contains the positive frequencies. I want to turn this into  
a real signal. In the reverse direction, you use a hilbert transform,  
right? But how do you do it in the reverse direction?  
Do I just do a complex-to-float, and take the one that’s “real”, and  
ignore the other one?

Left his complex arithmetic brain in his other pants…

–  
Marcus L.  
Principal Investigator, Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [February 16, 2009, 9:27am UTC](https://www.ruby-forum.com/t/complex-real/160402/2 "2009-02-16T09:27:23Z")

</div>

On Sun, Feb 15, 2009 at 05:50:24PM -0500, Marcus D. Leech wrote:

> I have a complex stream that I’ve bandpass filtered so that it only  
> contains the positive frequencies. I want to turn this into  
> a real signal. In the reverse direction, you use a hilbert transform,  
> right? But how do you do it in the reverse direction?  
> Do I just do a complex-to-float, and take the one that’s “real”, and  
> ignore the other one?

You can do that, or use gr\_complex\_to\_real() which I would prefer for  
coid readability. In my textbooks, the baseband to passband relation is  
often described as

s(t) = Re{ x(t) exp(j 2 pi fc t) }

which is exactly what you’d be doing then (x(t) being the complex  
baseband signal).

Cheers,  
MB
