SignalProcessing - Maple Programming Help

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

SignalProcessing

 GaussianWindow
 multiply an array of samples by a Gaussian windowing function

 Calling Sequence GaussianWindow( A, alpha )

Parameters

 A - Array of real or complex numeric values; the signal alpha - numeric value greater than $2$

Options

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

Description

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

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

 • 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[GaussianWindow] 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{GaussianWindow}\left(a,3.14\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.00578576296403996}& {0.00441969001796775}& {-}{0.00760419055571812}& {0.00719232845135296}& {-}{0.000308486891418147}& {0.000110312371877521}& {-}{0.00174156375981026}& {0.00631288450467384}& {0.00119270268240361}& {0.00185673595973252}& {-}{0.00648161630422084}& {0.00553360990229038}& {-}{0.00690862532302568}& {-}{0.00642278993257323}& {-}{0.00783689652838606}& {0.00901150993315311}& {-}{0.00356769046228979}& {-}{0.00320914043909198}& {0.00125069193765231}& {0.000248419048689290}& {-}{0.00567885046878062}& {-}{0.00550073749375884}& {0.00798111550153498}& {0.00440320525163390}& {0.0107264928708993}& {-}{0.00630641613408160}& {-}{0.0104011843845565}& {0.00435924836854597}& {-}{0.00850517222755278}& {0.00410586438860390}& {-}{0.000691315359574067}& {-}{0.00616891377362820}& {0.0100453614653335}& {-}{0.00659275468136865}& {0.00935166221578305}& {0.0132116055133730}& {-}{0.0101940117799187}& {-}{0.00461154821990174}& {0.0117062155601527}& {0.0132897061289776}& {-}{0.0145118316899253}& {-}{0.0102330050347600}& {-}{0.00744915974060250}& {0.0118408611225978}& {-}{0.0114809738649993}& {0.00752423526228756}& {0.00689446005822658}& {-}{0.00811232950954346}& {-}{0.00266182101346530}& {-}{0.0161329048325455}& {-}{0.00981119167513941}& {0.0146855255778353}& {0.0151078028833567}& {-}{0.00990645412083726}& {-}{0.0137799730557753}& {0.00781591712154558}& {-}{0.00625230953110172}& {0.00787844601805297}& {0.00527646713172219}& {-}{0.00241058884713147}& {0.00466241835556522}& {-}{0.0102548515748840}& {-}{0.0168964481877551}& {-}{0.00347910744018636}& {-}{0.00252408388715592}& {-}{0.00399344835653323}& {-}{0.0126769361241406}& {0.0117984950547896}& {-}{0.0222978253647654}& {0.0179132266956905}& {-}{0.0237987422267498}& {-}{0.00395856380008266}& {-}{0.0147460727554791}& {-}{0.0170815219788899}& {0.0131280585873052}& {-}{0.0145721658909494}& {0.0109177743867994}& {0.0247192756569328}& {-}{0.0165283835353377}& {-}{0.0117509166840157}& {0.0244922253584748}& {-}{0.0256572430350530}& {0.0300904677430030}& {0.00852210880495802}& {-}{0.0302997445796794}& {0.0197953489150302}& {0.0167322591501746}& {0.0225602902563808}& {0.0166285963947449}& {-}{0.0265675945025757}& {0.0285605646000915}& {-}{0.0185152736985055}& {0.0107588184113095}& {0.00252192967851184}& {-}{0.0116202810912446}& {-}{0.0181060143353316}& {0.0254855060666739}& {0.0258147270409104}& {0.0352294608209531}& {-}{0.0148352061490130}& {\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{GaussianWindow}\left(\mathrm{Array}\left(1..N,'\mathrm{fill}'=1,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right),5.0,'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{0.00000391294778535533}& {0.00000410816342374103}& {0.00000431270699273902}& {0.00000452700294281048}& {0.00000475149397700020}& {0.00000498664178484046}& {0.00000523292780340834}& {0.00000549085400643687}& {0.00000576094372240579}& {0.00000604374248256345}& {0.00000633981889985817}& {0.00000664976557978416}& {0.00000697420006417469}& {0.00000731376580900355}& {0.00000766913319728417}& {0.00000804100058818520}& {0.00000843009540351109}& {0.00000883717525272646}& {0.00000926302909773393}& {0.00000970847845864660}& {0.0000101743786618282}& {0.0000106616201315065}& {0.0000111711297262989}& {0.0000117038721220216}& {0.0000122608512421905}& {0.0000128431117376533}& {0.0000134517405168293}& {0.0000140878683280707}& {0.0000147526713956912}& {0.0000154473731112495}& {0.0000161732457817083}& {0.0000169316124361300}& {0.0000177238486926074}& {0.0000185513846871665}& {0.0000194157070664181}& {0.0000203183610457739}& {0.0000212609525350839}& {0.0000222451503335913}& {0.0000232726883961433}& {0.0000243453681726355}& {0.0000254650610227123}& {0.0000266337107077851}& {0.0000278533359624726}& {0.0000291260331476135}& {0.0000304539789870396}& {0.0000318394333903456}& {0.0000332847423639312}& {0.0000347923410126389}& {0.0000363647566343503}& {0.0000380046119099521}& {0.0000397146281911236}& {0.0000414976288884437}& {0.0000433565429623595}& {0.0000452944085196023}& {0.0000473143765176807}& {0.0000494197145801268}& {0.0000516138109252127}& {0.0000539001784109010}& {0.0000562824586988346}& {0.0000587644265402165}& {0.0000613499941864725}& {0.0000640432159276327}& {0.0000668482927614102}& {0.0000697695771959971}& {0.0000728115781896414}& {0.0000759789662301059}& {0.0000792765785571534}& {0.0000827094245312416}& {0.0000862826911516490}& {0.0000900017487272919}& {0.0000938721567035305}& {0.0000978996696482962}& {0.000102090243400910}& {0.000106450041386997}& {0.000110985441102923}& {0.000115703040773238}& {0.000120609666184606}& {0.000125712377699761}& {0.000131018477455034}& {0.000136535516745039}& {0.000142271303598116}& {0.000148233910546156}& {0.000154431682592465}& {0.000160873245381313}& {0.000167567513572875}& {0.000174523699427229}& {0.000181751321601148}& {0.000189260214161379}& {0.000197060535818150}& {0.000205162779382623}& {0.000213577781452021}& {0.000222316732326171}& {0.000231391186159173}& {0.000240813071349915}& {0.000250594701175152}& {0.000260748784668827}& {0.000271288437751315}& {0.000282227194612254}& {0.000293579019350581}& {0.000305358317875383}& {\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[GaussianWindow] command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.