SignalProcessing - Maple Programming Help

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

SignalProcessing

 BlackmanNuttallWindow
 multiply an array of samples by a Blackman-Nuttall windowing function

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

$w\left(k\right)=0.3635819-0.4891775\mathrm{cos}\left(\frac{2k\mathrm{\pi }}{n}\right)+0.1365995\mathrm{cos}\left(\frac{4k\mathrm{\pi }}{n}\right)-0.0106411\mathrm{cos}\left(\frac{6k\mathrm{\pi }}{n}\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[BlackmanNuttallWindow] 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{BlackmanNuttallWindow}\left(a\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.000285447128015971}& {0.000215185060498212}& {-}{0.000366811044771846}& {0.000345060622194755}& {-}{0.0000147741941612653}& {0.00000529249671437342}& {-}{0.0000839817725735421}& {0.000306920534570388}& {0.0000586304259207915}& {0.0000925268554148313}& {-}{0.000328212071804340}& {0.000285334265399960}& {-}{0.000363436369654257}& {-}{0.000345278753937356}& {-}{0.000431145416442920}& {0.000507980409959636}& {-}{0.000206281860242551}& {-}{0.000190487714483199}& {0.0000762684124124128}& {0.0000155720377184563}& {-}{0.000366084975223993}& {-}{0.000364794780521611}& {0.000544626752699170}& {0.000309225104442217}& {0.000775287540523342}& {-}{0.000469122299579680}& {-}{0.000796265792507549}& {0.000343407578871498}& {-}{0.000689344765569777}& {0.000342317354719652}& {-}{0.0000592752685920110}& {-}{0.000543837967060547}& {0.000910271111335709}& {-}{0.000613888406214725}& {0.000894530594502559}& {0.00129779861566403}& {-}{0.00102801549369023}& {-}{0.000477263964734081}& {0.00124290580613072}& {0.00144709814327384}& {-}{0.00162000421472277}& {-}{0.00117073510897313}& {-}{0.000873121821268158}& {0.00142139314904789}& {-}{0.00141099464993556}& {0.000946407970140441}& {0.000887239612614818}& {-}{0.00106774592380262}& {-}{0.000358213409162837}& {-}{0.00221910195281163}& {-}{0.00137895900050517}& {0.00210838280057339}& {0.00221492709394988}& {-}{0.00148267048901782}& {-}{0.00210482296081750}& {0.00121804362551975}& {-}{0.000993839733335799}& {0.00127699476733245}& {0.000871859517647046}& {-}{0.000405943454557243}& {0.000799980664294291}& {-}{0.00179230738685077}& {-}{0.00300735482692392}& {-}{0.000630458800916370}& {-}{0.000465573157702904}& {-}{0.000749592593873452}& {-}{0.00242094238609812}& {0.00229187862936866}& {-}{0.00440480066800439}& {0.00359784266964346}& {-}{0.00485886340158104}& {-}{0.000821372700570233}& {-}{0.00310893980234781}& {-}{0.00365854987412585}& {0.00285590828537144}& {-}{0.00321918336523341}& {0.00244879102403165}& {0.00562819413656905}& {-}{0.00381944870334040}& {-}{0.00275550852988531}& {0.00582696171151793}& {-}{0.00619203513809895}& {0.00736527288503399}& {0.00211529899595806}& {-}{0.00762531946297197}& {0.00505018731144196}& {0.00432669464024762}& {0.00591203456522147}& {0.00441542926897230}& {-}{0.00714710561181155}& {0.00778291064936709}& {-}{0.00511022962089612}& {0.00300710539334021}& {0.000713724524064103}& {-}{0.00332942028699656}& {-}{0.00525134936191019}& {0.00748135106418186}& {0.00766896217190878}& {0.0105901421604580}& {-}{0.00451192037309178}& {\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{BlackmanNuttallWindow}\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.000363525733117006}& {0.000365703523902491}& {0.000369335146647278}& {0.000374423558458530}& {0.000380972899193244}& {0.000388988491365186}& {0.000398476840024966}& {0.000409445632611893}& {0.000421903738779022}& {0.000435861210189429}& {0.000451329280284083}& {0.000468320364020138}& {0.000486848057579148}& {0.000506927138044609}& {0.000528573563048468}& {0.000551804470384117}& {0.000576638177586880}& {0.000603094181480180}& {0.000631193157685055}& {0.000660956960095022}& {0.000692408620310961}& {0.000725572347038827}& {0.000760473525445294}& {0.000797138716473059}& {0.000835595656111755}& {0.000875873254624279}& {0.000918001595727143}& {0.000962011935722252}& {0.00100793670257917}& {0.00105580949496576}& {0.00110566508122552}& {0.00115753939829937}& {0.00121146955059093}& {0.00126749380877175}& {0.00132565160852590}& {0.00138598354923114}& {0.00144853139257449}& {0.00151333806110000}& {0.00158044763668696}& {0.00164990535895556}& {0.00172175762359785}& {0.00179605198063241}& {0.00187283713257865}& {0.00195216293255017}& {0.00203408038226289}& {0.00211864162995655}& {0.00220589996822724}& {0.00229590983176624}& {0.00238872679500595}& {0.00248440756966631}& {0.00258301000220239}& {0.00268459307114787}& {0.00278921688435308}& {0.00289694267611471}& {0.00300783280419300}& {0.00312195074671498}& {0.00323936109896078}& {0.00336012957002860}& {0.00348432297937736}& {0.00361200925324283}& {0.00374325742092432}& {0.00387813761093950}& {0.00401672104704381}& {0.00415908004411196}& {0.00430528800387755}& {0.00445541941052913}& {0.00460954982615811}& {0.00476775588605712}& {0.00493011529386400}& {0.00509670681655006}& {0.00526761027924799}& {0.00544290655991794}& {0.00562267758384703}& {0.00580700631798088}& {0.00599597676508284}& {0.00618967395771861}& {0.00638818395206304}& {0.00659159382152593}& {0.00679999165019421}& {0.00701346652608706}& {0.00723210853422174}& {0.00745600874948617}& {0.00768525922931609}& {0.00791995300617404}& {0.00816018407982677}& {0.00840604740941812}& {0.00865763890533561}& {0.00891505542086690}& {0.00917839474364367}& {0.00944775558687045}& {0.00972323758033591}& {0.0100049412612028}& {0.0102929680645761}& {0.0105874203138445}& {0.0108884012107939}& {0.0111960148254913}& {0.0115103660859345}& {0.0118315607674678}& {0.0121597054819585}& {0.0124949076667351}& {\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[BlackmanNuttallWindow] command was introduced in Maple 18.