SignalProcessing - Maple Programming Help

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

SignalProcessing

 WelchWindow
 multiply an array of samples by a Welch windowing function
 ReiszWindow
 multiply an array of samples by a Reisz windowing function

 Calling Sequence WelchWindow(A) ReiszWindow(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 WelchWindow(A) command multiplies the Array A by the Welch windowing function and returns the result in an Array having the same length.
 • The ReiszWindow( A ) command is provided as an alias.
 • The Welch windowing function $w\left(k\right)$ is defined as follows for a sample with $N$ points.

$w\left(k\right)=1-{\left(\frac{2k}{n}-1\right)}^{2}$

 • Before the code performing the computation runs, A is converted to datatype float or complex 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[WelchWindow] and SignalProcessing[ReiszWindow] commands are 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{WelchWindow}\left(a\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.00306426436412722}& {0.00458800561665385}& {-}{0.0116045643422282}& {0.0143434120836617}& {-}{0.000753726848730098}& {0.000317017291415312}& {-}{0.00572349124931116}& {0.0232419988790298}& {0.00484259673505073}& {0.00821140769524221}& {-}{0.0309117256002658}& {0.0282249201890466}& {-}{0.0374273889136863}& {-}{0.0367395473830002}& {-}{0.0470934859508888}& {0.0566372740358930}& {-}{0.0233612521372955}& {-}{0.0218178723464178}& {0.00880161088510968}& {0.00180466274642299}& {-}{0.0424814903828477}& {-}{0.0422783834814169}& {0.0628980038368977}& {0.0355150280171302}& {0.0883959170932870}& {-}{0.0530162224360283}& {-}{0.0890704452474191}& {0.0379757940167168}& {-}{0.0752808266148276}& {0.0368817119210974}& {-}{0.00629536560413691}& {-}{0.0568925592688175}& {0.0937358948021531}& {-}{0.0621896015791635}& {0.0891025656942636}& {0.127048269642956}& {-}{0.0988668513580785}& {-}{0.0450757829919795}& {0.115244185006622}& {0.131690401257743}& {-}{0.144657708893489}& {-}{0.102555887451310}& {-}{0.0750191902076588}& {0.119766948899525}& {-}{0.116576909926991}& {0.0766615598874553}& {0.0704543169495812}& {-}{0.0831120945667864}& {-}{0.0273297797380945}& {-}{0.165937082873669}& {-}{0.101057455803012}& {0.151426082293654}& {0.155895050740174}& {-}{0.102265775025536}& {-}{0.142268392927960}& {0.0806789539133207}& {-}{0.0645087164942241}& {0.0812266030548302}& {0.0543459907815081}& {-}{0.0247973374075628}& {0.0478901278073867}& {-}{0.105151656538745}& {-}{0.172916730452229}& {-}{0.0355279965515365}& {-}{0.0257144811729493}& {-}{0.0405794556644282}& {-}{0.128461432000243}& {0.119207748950828}& {-}{0.224585505856441}& {0.179828701759668}& {-}{0.238085189787576}& {-}{0.0394583488929357}& {-}{0.146430851300075}& {-}{0.168955402905447}& {0.129321838170826}& {-}{0.142942031316636}& {0.106628940386468}& {0.240339109965106}& {-}{0.159959957502292}& {-}{0.113185577370132}& {0.234765361348025}& {-}{0.244710067277360}& {0.285534187742324}& {0.0804482083245263}& {-}{0.284513372357794}& {0.184874502795829}& {0.155408832901616}& {0.208368236498018}& {0.152710147233677}& {-}{0.242577778106146}& {0.259247311443647}& {-}{0.167066621226525}& {0.0964940937832105}& {0.0224807784296388}& {-}{0.102944678973671}& {-}{0.159399419126203}& {0.222947416692938}& {0.224383902671129}& {0.304239598546597}& {-}{0.127280075616199}& {\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{WelchWindow}\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}{0.00390243530273438}& {0.00779724121093750}& {0.0116844177246094}& {0.0155639648437500}& {0.0194358825683594}& {0.0233001708984375}& {0.0271568298339844}& {0.0310058593750000}& {0.0348472595214844}& {0.0386810302734375}& {0.0425071716308594}& {0.0463256835937500}& {0.0501365661621094}& {0.0539398193359375}& {0.0577354431152344}& {0.0615234375000000}& {0.0653038024902344}& {0.0690765380859375}& {0.0728416442871094}& {0.0765991210937500}& {0.0803489685058594}& {0.0840911865234375}& {0.0878257751464844}& {0.0915527343750000}& {0.0952720642089844}& {0.0989837646484375}& {0.102687835693359}& {0.106384277343750}& {0.110073089599609}& {0.113754272460938}& {0.117427825927734}& {0.121093750000000}& {0.124752044677734}& {0.128402709960938}& {0.132045745849609}& {0.135681152343750}& {0.139308929443359}& {0.142929077148438}& {0.146541595458984}& {0.150146484375000}& {0.153743743896484}& {0.157333374023438}& {0.160915374755859}& {0.164489746093750}& {0.168056488037109}& {0.171615600585938}& {0.175167083740234}& {0.178710937500000}& {0.182247161865234}& {0.185775756835938}& {0.189296722412109}& {0.192810058593750}& {0.196315765380859}& {0.199813842773438}& {0.203304290771484}& {0.206787109375000}& {0.210262298583984}& {0.213729858398438}& {0.217189788818359}& {0.220642089843750}& {0.224086761474609}& {0.227523803710938}& {0.230953216552734}& {0.234375000000000}& {0.237789154052734}& {0.241195678710938}& {0.244594573974609}& {0.247985839843750}& {0.251369476318359}& {0.254745483398438}& {0.258113861083984}& {0.261474609375000}& {0.264827728271484}& {0.268173217773438}& {0.271511077880859}& {0.274841308593750}& {0.278163909912109}& {0.281478881835938}& {0.284786224365234}& {0.288085937500000}& {0.291378021240234}& {0.294662475585938}& {0.297939300537109}& {0.301208496093750}& {0.304470062255859}& {0.307723999023438}& {0.310970306396484}& {0.314208984375000}& {0.317440032958984}& {0.320663452148438}& {0.323879241943359}& {0.327087402343750}& {0.330287933349609}& {0.333480834960938}& {0.336666107177734}& {0.339843750000000}& {0.343013763427734}& {0.346176147460938}& {0.349330902099609}& {0.352478027343750}& {\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[WelchWindow] and SignalProcessing[ReiszWindow] commands were introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.