<< wind | FOSSEE_Signal_Processing_Toolbox | wrev >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > wkeep

# wkeep

Extracts a vector from the given vector of length l

### Syntax

    [y]=wkeep(x,l)
    [y]=wkeep(x,l,opt)

### Parameters

x:

  Real, complex or string type input vector or matrix

l:

  Length of matrix required

opt:

  Character input to determine which side to extract from

### Description

[y]=wkeep(x,l) extracts a vector of length l from the centre of input vector x. [y]=wkeep(x,l,opt) extracts vector based on opt which could be 'l','r' or 'c' (left, right or central).

### Examples

    [y]=wkeep([1 2 3;4 5 6],[2 2])

    [y]=wkeep([1 2 3 4 5 6],3,'r')

Report an issue
<< wind | FOSSEE_Signal_Processing_Toolbox | wrev >>