discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to compute square root?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] How to compute square root?
Date: Fri, 30 Apr 2010 17:50:12 -0700
User-agent: Mutt/1.5.20 (2009-08-17)

On Fri, Apr 30, 2010 at 04:07:00AM -0700, JAS DEO wrote:
> 
> Hi,
> I am doing linc transmitter by using gnu radio.In which i want to separate
> OFDM signal in two constant envelope(software part) and then power amplify
> it seprately, finally combine two signal(hardware part).I have done the
> software part in Matlab and here is the code for that.
> r=abs(normal_data);
> theta=angle(normal_data);
> %normal_data=r.*exp(i*theta);
> rmax=max(r);
> e1=j.*normal_data.*sqrt((rmax^2)./(r.^2)-1);
> s1=normal_data+e1;
> plot(s1,'b*')
> s2=normal_data-e1;
> plot(s2,'r*')
> 
> Here s1 and s2 are two signals with constant envelope.As i am new to GRC, is
> it possible to compute square root, which block should i use.
> Thanks 
> Regards


There is no square root block, but there are:

  gr.complex_to_mag:
    computes sqrt(re^2 + im^2)

  gr.complex_to_mag_squared:
    computes re^2 + im^2


Eric




reply via email to

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