Constructor examples of the SPECWIN class


Construct empty SPECWIN object
Construct a SPECWIN object by loading the object from a file
Construct a SPECWIN of a particular window type an length
Construct a SPECWIN Kaiser window with the prescribed psll
Construct a SPECWIN object from a parameter list (PLIST) object

For help in designing a SPECWIN object, see also the Spectral Window GUI documentation


Construct empty SPECWIN object

The following example creates an empty specwin object

w = specwin()
-------- None ------------

   alpha: -1
    psll: -1
     rov: -1
   nenbw: -1
    w3db: -1
flatness: -1
      ws: -1
     ws2: -1
     win: 1

--------------------------

Construct a SPECWIN object by loading the object from a file

The following example creates a new specwin object by loading the specwin object from disk.

p = specwin('specwin.mat')
p = specwin('specwin.xml')

Construct a SPECWIN of a particular window type an length

To create a spectral window object, you call the specwin class constructor. The following code fragment creates a 100-point Hanning window:

	>> w = specwin('Hanning', 100)
	-------- Hanning ------------

	   alpha: 0
	    psll: 31.5
	     rov: 50
	   nenbw: 1.5
	    w3db: 1.4382
	flatness: -1.4236
	      ws: 50
	     ws2: 37.5
	     win: 100

	-----------------------------
	

List of available window functions


Construct a SPECWIN Kaiser window with the prescribed psll

In the special case of creating a Kaiser window, the additional input parameter, PSLL, must be supplied. For example, the following code creates a 100-point Kaiser window with -150dB peak side-lobe level:

	>> w = specwin('Kaiser', 100, 150)
	-------- Kaiser ------------

	   alpha: 6.18029
	    psll: 150
	     rov: 73.3738
	   nenbw: 2.52989
	    w3db: 2.38506
	flatness: -0.52279
	      ws: 28.2558
	     ws2: 20.1819
	     win: 100

	----------------------------
	

Construct a SPECWIN object from a parameter list (PLIST) object

Construct a SPECWIN from its definion.

'Name'

Spectral window name [default: 'Kaiser']

'N'

Spectral window length [default: 10]

'PSLL'

Peak sidelobe length (only for Kaiser type)
[default: 150]

pl = plist('Name', 'Kaiser', 'N', 1000, 'PSLL', 75);

w = specwin(pl)
-------- Kaiser ------------

   alpha: 3.21394
    psll: 75
     rov: 63.4095
   nenbw: 1.85055
    w3db: 1.75392
flatness: -0.963765
      ws: 389.305
     ws2: 280.892
     win: 1000

----------------------------
pl = plist('Name', 'Hanning', 'N', 1000);

w =specwin(pl)
-------- Hanning ------------

   alpha: 0
    psll: 31.5
     rov: 50
   nenbw: 1.5
    w3db: 1.4382
flatness: -1.4236
      ws: 500
     ws2: 375
     win: 1000

-----------------------------



©LTP Team