[Top][All Lists]

Re: [Discuss-gnuradio] How to specify a complex number in block: vector_

 From: Activecat Subject: Re: [Discuss-gnuradio] How to specify a complex number in block: vector_source ? Date: Sat, 8 Feb 2014 17:38:48 +0800

Dear Marcus,

Now I know the reason:

Vector:  ( 1 + 4j )       ==> this doesn't work
Vector:  ( 1 + 4j, )      ==> this work!

So there must have a comma if it is one element.
Thanks.

On Sat, Feb 8, 2014 at 5:28 PM, Marcus Müller wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oh I just realized:
since python is complaining about "j" not being known:
*Don't* have a space between "2" and "j". 2j is a numeric literal,
which python understands, 2 j is a numeric literal (2) and a name (j),
which python can't understand.

Greetings,
Marcus

On 08.02.2014 08:33, Activecat wrote:
> Dear Marcus,
>
> Thanks, it accepts ( complex(1,2), complex(3,4), complex(5,6) ).
> The other two are not accepted, message: name 'j' is not defined.
>
> Nevertheless, that is good enough. Thanks.
>
> Regards, activecat
>
> On Sat, Feb 8, 2014 at 2:38 PM, Marcus Müller <address@hidden>
> wrote:
>
> Hi activecat,
>
> have you just tried the most intuitive options:
>
> Vector = ( 1 + 2j, 2 + 4.0 * 1j, complex(3,-1) )
>
> all three elements work, since this is just python :)
>
> Greetings, Marcus
>
>
> On 08.02.2014 07:28, Activecat wrote:
>>>> Dear Sir,
>>>>
>>>> I am using the built-in block of Vector Source, configured
>>>> as below: Output Type = Complex. Vector = ( 1, 2, 3 )
>>>>
>>>> Then I run the flow graph. The block sends out  1 + 0i,  2 +
>>>> 0i, 3 + 0i.
>>>>
>>>> Question: How to make it sends 1 + 2i ? (How to configure
>>>> this at the Vector field?)
>>>>
>>>> Regards, activecat
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>
>>
>
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS9fi0AAoJEAFxB7BbsDrLT9kH/icf6j2LbltF+M7cqX73uG5S
uG+YsMc90k3QE9wOhFQG7mDAivBOUjF2gEmxKavYLHtqXRwAJ0eu7NHif1lcHBgV
7jyrrO6Gqk3cq3pvwM+pI9/hSHyH5l1K+yLnkyNuLrWTScIJqX5y4/EWHTLZcls/
DrP9vpgnsjo0RcVtB0Tv0dWyeyAGYW9r5I8UscFtlgFQlr5XSoHQhwlZy2nPJrLt
dg4AgZuXEdhKzG8pVeJDNhXFsP2VYHThheXtBPTlRqILhtcRaQ8HHminyCp53kdA
Unm4QXUH9cZbToURySxoUd/QvohjOUEmTgGk+OoH7UW2RbCpkq0LU7E7IklDKAI=
=kFhZ
-----END PGP SIGNATURE-----

_______________________________________________