PO_matlab
sideslice.m File Reference

Extracts elements from both ends of a vector. More...

Functions

function sideslice (in v, in k)

Detailed Description

Extracts elements from both ends of a vector.

Returns a new vector composed of the first floor(k/2) elements and the last (k - floor(k/2)) elements from the input vector v. Useful for symmetric slicing from the edges.

Parameters
vInput vector
kTotal number of elements to extract (must be <= length(v))
Return values
sVector containing the concatenated slices from both ends

Function Documentation

◆ sideslice()

function sideslice ( in v,
in k )
Here is the call graph for this function:
Here is the caller graph for this function: