SignalProcessing - Maple Programming Help

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

SignalProcessing

 ParzenWindow
 multiply an array of samples by a Parzen windowing function

 Calling Sequence ParzenWindow(A)

Parameters

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

Options

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

Description

 • The ParzenWindow(A) command multiplies the Array A by the Parzen windowing function and returns the result in an Array having the same length.
 • The Parzen windowing function $w\left(k\right)$ is defined as follows for a sample with $N$ points.

$w\left(k\right)=\left\{\begin{array}{cc}1-6{\left(\frac{2k}{N}-1\right)}^{2}\left(1-\left|-\frac{2k}{N}+1\right|\right)& \left|\frac{N}{2}-k\right|\le \frac{N}{4}\\ 2{\left(1-\left|-\frac{2k}{N}+1\right|\right)}^{3}& \mathrm{otherwise}\end{array}\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[ParzenWindow] 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{ParzenWindow}\left(a\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{1.17006673239217}{}{{10}}^{{-8}}& {7.01444107242822}{}{{10}}^{{-8}}& {-}{3.99581748439238}{}{{10}}^{{-7}}& {8.78885544342013}{}{{10}}^{{-7}}& {-}{7.22336973221772}{}{{10}}^{{-8}}& {4.37922952900572}{}{{10}}^{{-8}}& {-}{0.00000107719960367597}& {0.00000571899578716285}& {0.00000150958411152674}& {0.00000316329500094082}& {-}{0.0000144231197465456}& {0.0000156882585042873}& {-}{0.0000244390946711679}& {-}{0.0000278502138268411}& {-}{0.0000410215650510638}& {0.0000561877718610050}& {-}{0.0000261893381783701}& {-}{0.0000274485533682256}& {0.0000123498971141348}& {0.00000280855133594216}& {-}{0.0000729621185616426}& {-}{0.0000797730227241057}& {0.000129842985255834}& {0.0000799088130385429}& {0.000216026370836870}& {-}{0.000140276515400939}& {-}{0.000254405225776425}& {0.000116767940939955}& {-}{0.000248552038250118}& {0.000130444938101215}& {-}{0.0000237988039148082}& {-}{0.000229405480922651}& {0.000402364993691445}& {-}{0.000283661534980717}& {0.000431111930356866}& {0.000650993790554112}& {-}{0.000535669640914741}& {-}{0.000257865708356120}& {0.000695139615304063}& {0.000836448178720418}& {-}{0.000966308528778112}& {-}{0.000719627456180428}& {-}{0.000552332133560944}& {0.000924221990870057}& {-}{0.000941921933263203}& {0.000647909719779905}& {0.000622255574069316}& {-}{0.000766402511374055}& {-}{0.000262895837945372}& {-}{0.00166373647324247}& {-}{0.00105525132701549}& {0.00164551233973942}& {0.00176167126966863}& {-}{0.00120089803469098}& {-}{0.00173488248438742}& {0.00102098882793200}& {-}{0.000846645633603178}& {0.00110493616021468}& {0.000765780415764369}& {-}{0.000361735017939680}& {0.000722835400324856}& {-}{0.00164128673878855}& {-}{0.00278968239124650}& {-}{0.000592133275858942}& {-}{0.000442533249787013}& {-}{0.000720756576503169}& {-}{0.00235380489260504}& {0.00225229075881206}& {-}{0.00437357490748738}& {0.00360800182874072}& {-}{0.00491944616391974}& {-}{0.000839318870884399}& {-}{0.00320521986140452}& {-}{0.00380427543713086}& {0.00299425110194488}& {-}{0.00340203542360929}& {0.00260775387552538}& {0.00603785323495188}& {-}{0.00412661249492313}& {-}{0.00299749940069205}& {0.00638046599865950}& {-}{0.00682320898177486}& {0.00816553624533769}& {0.00235888695951570}& {-}{0.00855135581105672}& {0.00569417903234088}& {0.00490382143906888}& {0.00673412302784727}& {0.00505354727706365}& {-}{0.00821767934731239}& {0.00898825607107800}& {-}{0.00592665253680470}& {0.00350168424883772}& {0.000834342062350003}& {-}{0.00390656841924020}& {-}{0.00618359815575787}& {0.00883946974305493}& {0.00909060728795526}& {0.0125922816949121}& {-}{0.00538082029627463}& {\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{ParzenWindow}\left(\mathrm{Array}\left(1..N,'\mathrm{fill}'=1,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right),'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{1.49011611938477}{}{{10}}^{{-8}}& {1.19209289550781}{}{{10}}^{{-7}}& {4.02331352233887}{}{{10}}^{{-7}}& {9.53674316406250}{}{{10}}^{{-7}}& {0.00000186264514923096}& {0.00000321865081787109}& {0.00000511109828948975}& {0.00000762939453125000}& {0.0000108629465103149}& {0.0000149011611938477}& {0.0000198334455490112}& {0.0000257492065429688}& {0.0000327378511428833}& {0.0000408887863159180}& {0.0000502914190292358}& {0.0000610351562500000}& {0.0000732094049453735}& {0.0000869035720825195}& {0.000102207064628601}& {0.000119209289550781}& {0.000137999653816223}& {0.000158667564392090}& {0.000181302428245544}& {0.000205993652343750}& {0.000232830643653870}& {0.000261902809143066}& {0.000293299555778503}& {0.000327110290527344}& {0.000363424420356750}& {0.000402331352233887}& {0.000443920493125916}& {0.000488281250000000}& {0.000535503029823303}& {0.000585675239562988}& {0.000638887286186218}& {0.000695228576660156}& {0.000754788517951965}& {0.000817656517028809}& {0.000883921980857849}& {0.000953674316406250}& {0.00102700293064117}& {0.00110399723052979}& {0.00118474662303925}& {0.00126934051513672}& {0.00135786831378937}& {0.00145041942596436}& {0.00154708325862885}& {0.00164794921875000}& {0.00175310671329498}& {0.00186264514923096}& {0.00197665393352509}& {0.00209522247314453}& {0.00221844017505646}& {0.00234639644622803}& {0.00247918069362640}& {0.00261688232421875}& {0.00275959074497223}& {0.00290739536285400}& {0.00306038558483124}& {0.00321865081787109}& {0.00338228046894073}& {0.00355136394500732}& {0.00372599065303802}& {0.00390625000000000}& {0.00409223139286041}& {0.00428402423858643}& {0.00448171794414520}& {0.00468540191650391}& {0.00489516556262970}& {0.00511109828948975}& {0.00533328950405121}& {0.00556182861328125}& {0.00579680502414703}& {0.00603830814361572}& {0.00628642737865448}& {0.00654125213623047}& {0.00680287182331085}& {0.00707137584686279}& {0.00734685361385345}& {0.00762939453125000}& {0.00791908800601959}& {0.00821602344512939}& {0.00852029025554657}& {0.00883197784423828}& {0.00915117561817169}& {0.00947797298431396}& {0.00981245934963226}& {0.0101547241210938}& {0.0105048567056656}& {0.0108629465103149}& {0.0112290829420090}& {0.0116033554077148}& {0.0119858533143997}& {0.0123766660690308}& {0.0127758830785751}& {0.0131835937500000}& {0.0135998874902725}& {0.0140248537063599}& {0.0144585818052292}& {0.0149011611938477}& {\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[ParzenWindow] command was introduced in Maple 18.