PO_matlab
|
Extracts a centered window of specified length from a vector. More...
Functions | |
function | center_slice (in v, in k) |
Extracts a centered window of specified length from a vector.
This function returns a subvector of length k, centered around the middle of the input vector v. If k is larger than the length of v, an error is raised. If the window would exceed the vector bounds, it is clamped appropriately.
v | Input vector |
k | Desired window length (must be less than or equal to length(v)) |
c | Output vector of length k centered within v |
function center_slice | ( | in | v, |
in | k ) |