Main Content

dpssdir

Manage discrete prolate spheroidal sequences database directory

Description

dpssdir lists the directory of saved sequences in dpss.mat. Create the DPSS MAT-file database using dpsssave.

example

dpssdir(seqLength) lists the sequences saved with length seqLength.

example

dpssdir(timeHalfBW,"NW") lists the sequences saved with time-half-bandwidth product timeHalfBW.

example

dpssdir(seqLength,timeHalfBW) lists the sequences saved with length seqLength and time-half-bandwidth product timeHalfBW.

example

index = dpssdir(___) returns a structure array index describing the DPSS database. To generate a filtered index, pass the seqLength and timeHalfBW options as in the previous syntaxes.

example

Examples

collapse all

Create and manage DPSS sequences.

Generate four Slepian sequences. Each sequence has 128, 64, 256, and 64 samples, respectively. The corresponding time-half-bandwidth products are 1, 2, 3, and 4.

sL = [128 64 256 64]; % Segment length
tHBW = 1:length(sL); % Time-half-bandwidth product
for k=1:length(sL)
    [dpsSeq,lambda] = dpss(sL(k),tHBW(k));
    dpsssave(tHBW(k),dpsSeq,lambda);
end

List all the databases of Slepian sequences from the dpss.mat file.

dpssdir
File: C:\Example\dpss.mat
    N     NW    Variable names
   ---   ----  ----------------
     64  2.00  E2, V2
         4.00  E4, V4
    128  1.00  E1, V1
    256  3.00  E3, V3

List the databases with 64 Slepian sequences from the dpss.mat file.

dpssdir(64)
File: C:\Example\dpss.mat
    N     NW    Variable names
   ---   ----  ----------------
     64  2.00  E2, V2
         4.00  E4, V4

List the databases with a time-half-bandwidth product of 2.

dpssdir(2,"nw")
File: C:\Example\dpss.mat
    N     NW    Variable names
   ---   ----  ----------------
     64  2.00  E2, V2

List the databases with 256 Slepian sequences and time-half-bandwidth product of 3.

dpssdir(256,3)
File: C:\Example\dpss.mat
    N     NW    Variable names
   ---   ----  ----------------
    256  3.00  E3, V3

Display the index structure for all the databases of Slepian sequences from the dpss.mat file.

index = dpssdir
index=1×3 struct array with fields:
    N
    wlist

Input Arguments

collapse all

Sequence length, specified as a positive integer.

Data Types: single | double

Time-half-bandwidth product, specified as a positive scalar. This argument must be less than seqLength/2.

Data Types: single | double

Output Arguments

collapse all

Index of DPSS databases, returned as a struct array.

  • If you specify to return index and do not specify any input arguments, the dpssdir function returns the index variable in the dpss.mat file.

  • If you specify to return index and specify input arguments, the dpssdir function returns a filtered subset of the index variable in the dpss.mat file based on the values of seqLength and timeHalfBW.

  • If you do not specify to return index, dpssdir reads the index variable in the dpss.mat file and returns a table with these columns:

    • N — Sequence lengths.

    • NW — Time-half-bandwidth products.

    • Variable names — Variable names that represent the Slepian sequences (E1, E2, …, En) and their corresponding frequency-domain energy concentration ratios (V1, V2, …, Vn) for a DPSS database with n Slepian sequences.

See Structure of DPSS MAT- file Database for more information.

More About

collapse all

Structure of DPSS MAT- file Database

The dpsssave function creates and stores a file named dpss.mat with the DPSS (Slepian sequences) that you generate with the dpss function.

The dpsssave function assigns a location key (1, 2, …, n) and a name (E1, V1, E2, V2, ..., En, Vn) for each Slepian sequence that it generates and stores it in the dpss.mat file, from the first to the nth sequence.

A dpss.mat file with n sequences presents the following structure:

  • E1, E2, …, En — Slepian sequences.

  • V1, V2, …, Vn — Frequency-domain energy concentration ratios.

  • index — Database index, a struct array with information of the list of sequence lengths, time-half bandwidth products and locations of the Slepian sequences stored in the DPSS MAT-file database. This structure array comprises of the following fields:

    • N — Vector of sequence lengths. The dpsssave function assigns a single entry in N for each different value of sequence length.

    • Wlist — Structure array of time-half bandwidth products NW and sequence location numbers key. The dpsssave function assigns a sequence location key to each Slepian sequence each time you call it.

  • next_key — Next-sequence identification key, defined as next_key=n+1 where n is the number of Slepian sequences stored in the DPSS MAT-file database.

Version History

Introduced before R2006a