SignalProcessing - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Windowing Functions : SignalProcessing/HannPoissonWindow

SignalProcessing

 HannPoissonWindow
 multiply an array of samples by a Hann-Poisson windowing function

 Calling Sequence HannPoissonWindow( A, alpha )

Parameters

 A - Array of real or complex numeric values; the signal alpha - real numeric constant

Options

 • container : Array, predefined Array for holding results
 • inplace : truefalse, specifies that output should overwrite input

Description

 • The HannPoissonWindow( A, alpha ) command multiplies the Array A by the Hann-Poisson windowing function, with parameter $\mathrm{\alpha }$, and returns the result in an Array having the same length.
 • The Hann-Poisson windowing function $w\left(k\right)$ with parameter $\mathrm{\alpha }$ is defined as follows for a sample with $N$ points.

$w\left(k\right)=\left(\frac{1}{2}-\frac{\mathrm{cos}\left(\frac{2k\mathrm{\pi }}{N}\right)}{2}\right){ⅇ}^{-\mathrm{\alpha }\left|\frac{2k}{N}-1\right|}$

 • Before the code performing the computation runs, A is converted to datatype float[8] or complex[8] if it does not have one of those datatypes already. For this reason, it is most efficient if A has one of these datatypes beforehand. This does not apply if inplace is true.
 • If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of the same size and datatype as A.
 • If the inplace or inplace=true option is provided, then A is overwritten with the results. In this case, the container option is ignored.

 • The SignalProcessing[HannPoissonWindow] command is thread-safe as of Maple 18.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $N≔1024:$
 > $a≔\mathrm{GenerateUniform}\left(N,-1,1\right)$
 ${a}{≔}\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.785218492150308}& {0.588413964957000}& {-}{0.993165822699668}& {0.921578288543971}& {-}{0.0387801709584892}& {0.0136057925410569}& {-}{0.210756972897798}& {0.749600215815009}& {0.138966357801110}& {0.212285134010017}& {-}{0.727212007157506}& {0.609271531458945}& {-}{0.746508821379394}& {-}{0.681121068540962}& {-}{0.815677223727108}& {0.920580454170705}& {-}{0.357731881551445}& {-}{0.315850691869855}& {0.120832127984613}& {0.0235598362050951}& {-}{0.528712330386043}& {-}{0.502768306992949}& {0.716167932841928}& {0.387918812688441}& {0.927826197817923}& {-}{0.535605234093965}& {-}{0.867390423081817}& {0.356968106236309}& {-}{0.683916721958668}& {0.324222652241588}& {-}{0.0536105097271503}& {-}{0.469822424929590}& {0.751377623062582}& {-}{0.484332469291986}& {0.674785583745689}& {0.936373751610519}& {-}{0.709695004858078}& {-}{0.315371678676457}& {0.786426438484342}& {0.877079485449941}& {-}{0.940901432652028}& {-}{0.651838099118323}& {-}{0.466202749870718}& {0.728111944627018}& {-}{0.693676937371493}& {0.446705075912178}& {0.402212079148740}& {-}{0.465064398013056}& {-}{0.149959974456579}& {-}{0.893211717717351}& {-}{0.533857398666442}& {0.785364017821850}& {0.794103573076428}& {-}{0.511805256363005}& {-}{0.699780572205783}& {0.390154657885433}& {-}{0.306801157072187}& {0.380043311044574}& {0.250223507639021}& {-}{0.112387157976628}& {0.213712436612696}& {-}{0.462156727444381}& {-}{0.748708907514812}& {-}{0.151586118619889}& {-}{0.108139840420336}& {-}{0.168242880143225}& {-}{0.525201478973032}& {0.480703854002059}& {-}{0.893447801005097}& {0.705915172118695}& {-}{0.922403736039998}& {-}{0.150907000061125}& {-}{0.552928699180485}& {-}{0.630023401696236}& {0.476304094772787}& {-}{0.520089327357710}& {0.383331325836480}& {0.853844197466971}& {-}{0.561684322543443}& {-}{0.392888241447509}& {0.805707171559335}& {-}{0.830475841183217}& {0.958363623823972}& {0.267084791325033}& {-}{0.934454344213010}& {0.600780255626888}& {0.499754573684187}& {0.663151745684446}& {0.481067702174187}& {-}{0.756487140897663}& {0.800444356631489}& {-}{0.510770577006043}& {0.292151435278357}& {0.0674125049263240}& {-}{0.305776782333851}& {-}{0.469037371221931}& {0.649966387543828}& {0.648178403731437}& {0.870920942630620}& {-}{0.361100737471134}& {\mathrm{...}}& {"... 924 Array entries not shown"}\end{array}\right]$ (1)
 > $\mathrm{HannPoissonWindow}\left(a,1.23\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.00000216545967305113}& {0.00000650641530862292}& {-}{0.0000247684942608289}& {0.0000409563583191073}& {-}{0.00000269929223753667}& {0.00000136695701839869}& {-}{0.0000288889765619374}& {0.000134519946651276}& {0.0000316367500413867}& {0.0000598045443094178}& {-}{0.000248471008666394}& {0.000248321699776583}& {-}{0.000357908654204539}& {-}{0.000379609845091107}& {-}{0.000523072321636111}& {0.000673230339424529}& {-}{0.000296016422510227}& {-}{0.000293685688756080}& {0.000125469586083868}& {0.0000271688507955903}& {-}{0.000673727823350981}& {-}{0.000704732704263800}& {0.00109967335758783}& {0.000650033511215224}& {0.00169081309372649}& {-}{0.00105806967392327}& {-}{0.00185197869191145}& {0.000821500173343878}& {-}{0.00169210386533111}& {0.000860352749844814}& {-}{0.000152238385735873}& {-}{0.00142476085090178}& {0.00242856151939430}& {-}{0.00166539155695354}& {0.00246414386707772}& {0.00362547498608797}& {-}{0.00290890574858013}& {-}{0.00136642367131565}& {0.00359684001720680}& {0.00422890873634305}& {-}{0.00477654707066176}& {-}{0.00347993112219579}& {-}{0.00261439643156610}& {0.00428437866162534}& {-}{0.00427847034462027}& {0.00288510724753349}& {0.00271764464291254}& {-}{0.00328436267390321}& {-}{0.00110594623674267}& {-}{0.00687336075467788}& {-}{0.00428297776279774}& {0.00656388000288595}& {0.00690894667298522}& {-}{0.00463204189213330}& {-}{0.00658357826241838}& {0.00381311038202484}& {-}{0.00311287925520000}& {0.00400065363013788}& {0.00273122552360568}& {-}{0.00127123381592688}& {0.00250365097473128}& {-}{0.00560444105040630}& {-}{0.00939347597454059}& {-}{0.00196662451267149}& {-}{0.00145004538568335}& {-}{0.00233054808194842}& {-}{0.00751226057765534}& {0.00709658445236932}& {-}{0.0136074707828887}& {0.0110869474752760}& {-}{0.0149331608526460}& {-}{0.00251730720151564}& {-}{0.00949996023510184}& {-}{0.0111447260739016}& {0.00867152955809039}& {-}{0.00974161200221889}& {0.00738440560324163}& {0.0169105970944631}& {-}{0.0114331567475031}& {-}{0.00821664432271568}& {0.0173067611982821}& {-}{0.0183165440403808}& {0.0216966590660833}& {0.00620481533971179}& {-}{0.0222704544276215}& {0.0146843572246586}& {0.0125240315605594}& {0.0170345572953700}& {0.0126630918559684}& {-}{0.0204003820141754}& {0.0221085918915142}& {-}{0.0144457910841948}& {0.00845869971326766}& {0.00199762043155991}& {-}{0.00927156095000863}& {-}{0.0145489825699705}& {0.0206203424481451}& {0.0210273351837010}& {0.0288841704804293}& {-}{0.0122407949477557}& {\mathrm{...}}& {"... 924 row vector entries not shown"}\end{array}\right]$ (2)
 > $c≔\mathrm{Array}\left(1..N,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right):$
 > $\mathrm{HannPoissonWindow}\left(\mathrm{Array}\left(1..N,'\mathrm{fill}'=1,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right),0.72,'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{0.00000458793408006478}& {0.0000183773886274078}& {0.0000414066629547182}& {0.0000737138157785920}& {0.000115336663057054}& {0.000166312775830997}& {0.000226679478069116}& {0.000296473844516550}& {0.000375732698547567}& {0.000464492610022100}& {0.000562789893146342}& {0.000670660604337540}& {0.000788140540093067}& {0.000915265234863671}& {0.00105206995893145}& {0.00119858971629212}& {0.00135485924254201}& {0.00152091300276995}& {0.00169678518945357}& {0.00188250972036112}& {0.00207812023645774}& {0.00228365009981729}& {0.00249913239153912}& {0.00272459990967035}& {0.00296008516713343}& {0.00320562038965930}& {0.00346123751372610}& {0.00372696818450364}& {0.00400284375380374}& {0.00428889527803627}& {0.00458515351617139}& {0.00489164892770778}& {0.00520841167064716}& {0.00553547159947506}& {0.00587285826314789}& {0.00622060090308671}& {0.00657872845117742}& {0.00694726952777771}& {0.00732625243973074}& {0.00771570517838581}& {0.00811565541762587}& {0.00852613051190227}& {0.00894715749427655}& {0.00937876307446962}& {0.00982097363691819}& {0.0102738152388388}& {0.0107373136082992}& {0.0112114941422979}& {0.0116963819048509}& {0.0121920016250863}& {0.0126983776953479}& {0.0132155341693050}& {0.0137434947600722}& {0.0142822828383364}& {0.0148319214304924}& {0.0153924332167872}& {0.0159638405294722}& {0.0165461653509649}& {0.0171394293120186}& {0.0177436536899015}& {0.0183588594065844}& {0.0189850670269373}& {0.0196222967569358}& {0.0202705684418757}& {0.0209299015645983}& {0.0216003152437234}& {0.0222818282318934}& {0.0229744589140263}& {0.0236782253055782}& {0.0243931450508161}& {0.0251192354211002}& {0.0258565133131767}& {0.0266049952474800}& {0.0273646973664457}& {0.0281356354328338}& {0.0289178248280616}& {0.0297112805505484}& {0.0305160172140694}& {0.0313320490461209}& {0.0321593898862966}& {0.0329980531846741}& {0.0338480520002129}& {0.0347093989991626}& {0.0355821064534837}& {0.0364661862392780}& {0.0373616498352316}& {0.0382685083210685}& {0.0391867723760164}& {0.0401164522772832}& {0.0410575578985466}& {0.0420100987084536}& {0.0429740837691340}& {0.0439495217347240}& {0.0449364208499032}& {0.0459347889484431}& {0.0469446334517680}& {0.0479659613675284}& {0.0489987792881866}& {0.0500430933896150}& {0.0510989094297070}& {\mathrm{...}}& {"... 924 row vector entries not shown"}\end{array}\right]$ (3)
 > $u≔{\mathrm{~}}_{\mathrm{log}}\left(\mathrm{FFT}\left(c\right)\right):$
 > $\mathbf{use}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{plots}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{in}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{display}\left(\mathrm{Array}\left(\left[\mathrm{listplot}\left(\mathrm{ℜ}\left(u\right)\right),\mathrm{listplot}\left(\mathrm{ℑ}\left(u\right)\right)\right]\right)\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end use}$

 > 

Compatibility

 • The SignalProcessing[HannPoissonWindow] command was introduced in Maple 18.