SignalProcessing - Maple Programming Help

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

SignalProcessing

 BohmanWindow
 multiply an array of samples by a Bohman windowing function

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

$w\left(k\right)=\left(1-\left|\frac{2k}{n}-1\right|\right)\mathrm{cos}\left(\mathrm{\pi }\left|\frac{2k}{n}-1\right|\right)+\frac{\mathrm{sin}\left(\mathrm{\pi }\left|\frac{2k}{n}-1\right|\right)}{\mathrm{\pi }}$

 • 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[BohmanWindow] 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{BohmanWindow}\left(a\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{1.92463501991855}{}{{10}}^{{-8}}& {1.15380588146503}{}{{10}}^{{-7}}& {-}{6.57261827225365}{}{{10}}^{{-7}}& {0.00000144561979110577}& {-}{1.18808386434781}{}{{10}}^{{-7}}& {7.20256333316458}{}{{10}}^{{-8}}& {-}{0.00000177159469895716}& {0.00000940510133839953}& {0.00000248240850177686}& {0.00000520145182194560}& {-}{0.0000237142704819005}& {0.0000257921589198370}& {-}{0.0000401751214169994}& {-}{0.0000457779635716846}& {-}{0.0000674206194102825}& {0.0000923361211448779}& {-}{0.0000430328757918215}& {-}{0.0000450960042749028}& {0.0000202871679148993}& {0.00000461292781103645}& {-}{0.000119818715734630}& {-}{0.000130982395988337}& {0.000213158058511902}& {0.000131159891813721}& {0.000354513656245375}& {-}{0.000230158872462131}& {-}{0.000417332354330765}& {0.000191509201969478}& {-}{0.000407558609639450}& {0.000213847123814275}& {-}{0.0000390060050638524}& {-}{0.000375904055347027}& {0.000659154177406255}& {-}{0.000464576870633163}& {0.000705885418696855}& {0.00106562589675647}& {-}{0.000876607980556005}& {-}{0.000421870503219751}& {0.00113692418288415}& {0.00136763156229141}& {-}{0.00157947665242955}& {-}{0.00117589666189930}& {-}{0.000902240855341399}& {0.00150923174866441}& {-}{0.00153761890448006}& {0.00105730228012526}& {0.00101508182117499}& {-}{0.00124977968498499}& {-}{0.000428549748902008}& {-}{0.00271106399182671}& {-}{0.00171887992043364}& {0.00267930328751520}& {0.00286730180748511}& {-}{0.00195379581072295}& {-}{0.00282139767595474}& {0.00165971351843284}& {-}{0.00137571480280482}& {0.00179463120554643}& {0.00124322652950626}& {-}{0.000587004248285644}& {0.00117244228805744}& {-}{0.00266093692739610}& {-}{0.00452063693742889}& {-}{0.000959082068624611}& {-}{0.000716424340152329}& {-}{0.00116626661910916}& {-}{0.00380680983333193}& {0.00364077086868882}& {-}{0.00706610869303767}& {0.00582615485959008}& {-}{0.00793961960148278}& {-}{0.00135386497991836}& {-}{0.00516734847277743}& {-}{0.00612971255150138}& {0.00482182312978790}& {-}{0.00547536985591137}& {0.00419458952626142}& {0.00970622436974737}& {-}{0.00662983977564823}& {-}{0.00481289826546662}& {0.0102384654525501}& {-}{0.0109421508229096}& {0.0130866035209487}& {0.00377810679420614}& {-}{0.0136874831505414}& {0.00910831223974985}& {0.00783892054476537}& {0.0107575687724330}& {0.00806747325593934}& {-}{0.0131097724464188}& {0.0143292283078192}& {-}{0.00944180171570866}& {0.00557464317183020}& {0.00132731972355290}& {-}{0.00621033169665091}& {-}{0.00982302400272749}& {0.0140317350076797}& {0.0144196892027319}& {0.0199591435433468}& {-}{0.00852230456411198}& {\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{BohmanWindow}\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}{2.45108213721250}{}{{10}}^{{-8}}& {1.96087440166269}{}{{10}}^{{-7}}& {6.61784580382324}{}{{10}}^{{-7}}& {0.00000156863481819841}& {0.00000306363751108665}& {0.00000529374772651435}& {0.00000840586517541347}& {0.0000125468231464872}& {0.0000178633774465739}& {0.0000245021953430812}& {0.0000326098445136980}& {0.0000423327819996377}& {0.0000538173431665068}& {0.0000672097306720319}& {0.0000826560034399570}& {0.000100302065644070}& {0.000120293655698767}& {0.000142776335261233}& {0.000167895478241371}& {0.000195796259824542}& {0.000226623645503299}& {0.000260522380123245}& {0.000297636976939249}& {0.000338111706686066}& {0.000382090586662810}& {0.000429717369830170}& {0.000481135533924842}& {0.000536488270587124}& {0.000595918474507018}& {0.000659568732584825}& {0.000727581313111417}& {0.000800098154964318}& {0.000877260856823991}& {0.000959210666409166}& {0.00104608846973069}& {0.00113803478036803}& {0.00123518972876427}& {0.00133769305154555}& {0.00144568408085989}& {0.00155930173374175}& {0.00167868450149729}& {0.00180397043911643}& {0.00193529715470704}& {0.00207280179895625}& {0.00221662105461724}& {0.00236689112602143}& {0.00252374772861957}& {0.00268732607854860}& {0.00285776088222858}& {0.00303518632598661}& {0.00321973606571220}& {0.00341154321654059}& {0.00361074034256882}& {0.00381745944660090}& {0.00403183195992622}& {0.00425398873213045}& {0.00448406002093769}& {0.00472217548208853}& {0.00496846415924984}& {0.00522305447396151}& {0.00548607421561630}& {0.00575765053147763}& {0.00603790991673150}& {0.00632697820457798}& {0.00662498055635752}& {0.00693204145171737}& {0.00724828467881639}& {0.00757383332456749}& {0.00790880976492253}& {0.00825333565519464}& {0.00860753192042416}& {0.00897151874578370}& {0.00934541556702725}& {0.00972934106097983}& {0.0101234131360724}& {0.0105277489229182}& {0.0109424647649348}& {0.0113676762090110}& {0.0118034979962174}& {0.0122500440525646}& {0.0127074274798064}& {0.0131757605462909}& {0.0136551546778579}& {0.0141457204487855}& {0.0146475675727837}& {0.0151608048940385}& {0.0156855403783039}& {0.0162218811040451}& {0.0167699332536322}& {0.0173298021045837}& {0.0179015920208631}& {0.0184854064442262}& {0.0190813478856224}& {0.0196895179166469}& {0.0203100171610491}& {0.0209429452862928}& {0.0215884009951723}& {0.0222464820174825}& {0.0229172851017455}& {0.0236009060069927}& {\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[BohmanWindow] command was introduced in Maple 18.