discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] create lookup tables


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] create lookup tables
Date: Sat, 26 Dec 2015 11:52:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Andy,
this is python, so batteries included :)

Use the "import" block to "import math".

then, in the vector source's value field:

[ math.sin(x/(2*math.pi)/num_samples) for x in xrange(num_samples) ]

alternatively, "import numpy" and

numpy.sin(numpy.linspace(0, 2*numpy.pi, num_samples))

Best regards,
Marcus

On 12/26/2015 11:09 AM, Andreas Ladanyi wrote:
> Hi Martin,
>> You can create a lookup table for pretty much anything using a vector
>> source, it'll accept Python structures as inputs through GRC.
> i tested your suggestion and i am asking myself if there is an easy
> way to get a lot of lookup table values in to the vector value field
> of the vector source block.
>
> andy
>>
>> M
>>
>> On 20.12.2015 13:40, Andreas Ladanyi wrote:
>>> Hi,
>>> i want to create a file for example with a sine lookup table. I use a
>>> signal source und a file sink. I think about how it is possible to get
>>> sine array with a amount of 255 (8 bit) values with 8 bit for each
>>> entry.
>>> andy
>>>
>>>
>>> _______________________________________________
>>> Discuss-gnuradio mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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