SignalProcessing - Maple Programming Help

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

SignalProcessing

 RiemannWindow
 multiply an array of samples by a Riemann windowing function

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

$\left\{\begin{array}{cc}1& k=\frac{N}{2}\\ \frac{\mathrm{sin}\left(\left(\frac{2k}{N}-1\right)\mathrm{\pi }\right)}{\left(\frac{2k}{N}-1\right)\mathrm{\pi }}& \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[RiemannWindow] 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{RiemannWindow}\left(a\right)$
 $\left[\begin{array}{cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}{-}{0.00153662135514402}& {0.00230744775053264}& {-}{0.00585329889870951}& {0.00725579331158491}& {-}{0.000382387447331701}& {0.000161297064258556}& {-}{0.00292048559590589}& {0.0118936382532168}& {0.00248521196277570}& {0.00422613446867338}& {-}{0.0159546103648337}& {0.0146093075057336}& {-}{0.0194275080615803}& {-}{0.0191244406197513}& {-}{0.0245832823092824}& {0.0296484632243180}& {-}{0.0122634738360380}& {-}{0.0114853457672541}& {0.00464627459736467}& {0.000955314884228761}& {-}{0.0225504273397510}& {-}{0.0225047768272028}& {0.0335730870043107}& {0.0190090944594770}& {0.0474431056982879}& {-}{0.0285323874444866}& {-}{0.0480671287707187}& {0.0205496035658597}& {-}{0.0408469656963037}& {0.0200660617544848}& {-}{0.00343434960864943}& {-}{0.0311206255212842}& {0.0514120487839241}& {-}{0.0342010728856972}& {0.0491328532320636}& {0.0702436712380227}& {-}{0.0548078391317681}& {-}{0.0250544947413814}& {0.0642256714418571}& {0.0735847623071087}& {-}{0.0810431610688741}& {-}{0.0576067392691051}& {-}{0.0422493340308416}& {0.0676263861036111}& {-}{0.0659964136009998}& {0.0435121918366277}& {0.0400925191698430}& {-}{0.0474175721355825}& {-}{0.0156324660445254}& {-}{0.0951585952576530}& {-}{0.0581009292457027}& {0.0872815589672074}& {0.0900861807795962}& {-}{0.0592457436841565}& {-}{0.0826291377028843}& {0.0469764259868364}& {-}{0.0376556374573908}& {0.0475333868175740}& {0.0318826069793036}& {-}{0.0145839175093584}& {0.0282354665784450}& {-}{0.0621501116494961}& {-}{0.102455819964802}& {-}{0.0211028526923333}& {-}{0.0153114407888596}& {-}{0.0242219649466618}& {-}{0.0768666221981506}& {0.0715036870787041}& {-}{0.135039747910337}& {0.108390666032119}& {-}{0.143851793663742}& {-}{0.0238984030676942}& {-}{0.0889010080103317}& {-}{0.102822311982015}& {0.0788906245719816}& {-}{0.0874075177063046}& {0.0653576329344426}& {0.147664170760457}& {-}{0.0985118567887272}& {-}{0.0698701932129104}& {0.145263195156909}& {-}{0.151771849206870}& {0.177505747704179}& {0.0501282683988413}& {-}{0.177696200122263}& {0.115733402612644}& {0.0975126066432602}& {0.131043978753164}& {0.0962611544852901}& {-}{0.153260039095998}& {0.164166320536793}& {-}{0.106034823851049}& {0.0613826641638535}& {0.0143330847915610}& {-}{0.0657828531432622}& {-}{0.102087642090279}& {0.143107924436753}& {0.144352697333646}& {0.196163447276677}& {-}{0.0822487083079180}& {\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{RiemannWindow}\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.00195693475192619}& {0.00392147006691328}& {0.00589357664644441}& {0.00787322509848681}& {0.00986038580750491}& {0.0118550289350529}& {0.0138571244203726}& {0.0158666419809996}& {0.0178835511133749}& {0.0199078210934637}& {0.0219394209773796}& {0.0239783196020180}& {0.0260244855856924}& {0.0280778873287799}& {0.0301384930143727}& {0.0322062706089350}& {0.0342811878629677}& {0.0363632123116786}& {0.0384523112756594}& {0.0405484518615695}& {0.0426516009628253}& {0.0447617252602965}& {0.0468787912230091}& {0.0490027651088536}& {0.0511336129653004}& {0.0532713006301222}& {0.0554157937321205}& {0.0575670576918603}& {0.0597250577224111}& {0.0618897588300924}& {0.0640611258152271}& {0.0662391232729007}& {0.0684237155937262}& {0.0706148669646153}& {0.0728125413695568}& {0.0750167025903993}& {0.0772273142076410}& {0.0794443396012267}& {0.0816677419513482}& {0.0838974842392531}& {0.0861335292480590}& {0.0883758395635727}& {0.0906243775751165}& {0.0928791054763610}& {0.0951399852661614}& {0.0974069787494023}& {0.0996800475378478}& {0.101959153050996}& {0.104244256516941}& {0.106535318973239}& {0.108832301267786}& {0.111135164059689}& {0.113443867820156}& {0.115758372833388}& {0.118078639197468}& {0.120404626825270}& {0.122736295445362}& {0.125073604602921}& {0.127416513660652}& {0.129764981799711}& {0.132118968020636}& {0.134478431144282}& {0.136843329812762}& {0.139213622490394}& {0.141589267464651}& {0.143970222847122}& {0.146356446574473}& {0.148747896409413}& {0.151144529941673}& {0.153546304588979}& {0.155953177598041}& {0.158365106045539}& {0.160782046839122}& {0.163203956718405}& {0.165630792255975}& {0.168062509858402}& {0.170499065767254}& {0.172940416060120}& {0.175386516651634}& {0.177837323294505}& {0.180292791580559}& {0.182752876941770}& {0.185217534651318}& {0.187686719824630}& {0.190160387420444}& {0.192638492241862}& {0.195120988937426}& {0.197607832002179}& {0.200098975778747}& {0.202594374458416}& {0.205093982082220}& {0.207597752542028}& {0.210105639581641}& {0.212617596797891}& {0.215133577641744}& {0.217653535419409}& {0.220177423293452}& {0.222705194283913}& {0.225236801269430}& {0.227772196988362}& {\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[RiemannWindow] command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.