Hi,
Thanks for your reply!
Renaming doesn't work, but what I found out is, that, in my case, it
works with the following syntax:
sum(function for n_ in np.arange(-11,11,1))
Nevertheless, I'd be interested if there are other people out there
working with Signal Theory and stochastic signal description with sage.
I use sage since a few months in Signal Theory but even in the
notebooks, I didn't find too many examples how to solve similar problems.
Are there some sources that I didn't see yet?
Would be great to see how other sage users in electronic engineering and
research are working.
I'd like to improve my programming style and find more elegant solutions
for my problems (in some cases, I would love to find a solution at all).
Somebody out there?
Thanks,
Tobi
On 06/30/2010 01:53 PM, Burcin Erocal wrote:
> import numpy as np
>> import pylab as pl
>>
>> pl.ion()
>> pl.grid(True)
>>
>> var('t n_ ll ul')
>>
>> tt=np.arange(0.01,10,0.01)
>>
>> f=sin(t)/t
>> ts=0.5
>> fs=sum(f*dirac_delta(t-(2*n_-1)*ts),n_,0,20)/dirac_delta(0)
>>
>> fl=lambda t:f
>> fl=fl(t)
>>
>> fsl=lambda t:fs
>> fsl=fsl(t)
>>
>> fslm=map(fsl,tt)
>> fsld=np.array(fslm)
>> fsld=map(n,fsld)
>>
>> pl.vlines(tt,[0],fsld)
>>
>> flm=map(fl,tt)
>> fld=np.array(flm)
>> fld=map(n,fld)
>>
>> pl.plot(tt,fld,'--',linewidth=.5)
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org