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
>>> Discuss-gnuradio@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment