helscandeintrlv
Restore ordering of symbols in helical pattern
Description
deintrlvd = helscandeintrlv(data,Nrows,Ncols,hstep)
rearranges the elements in data
by filling a temporary matrix with
the elements in a helical fashion and then sending the matrix contents to the output row
by row. Nrows
and Ncols
are the dimensions of the
temporary matrix. hstep
is the slope of the diagonal, that is, the
amount by which the row index increases as the column index increases by one.
hstep
must be a nonnegative integer less than
Nrows
.
Helical fashion means that the function places input elements along diagonals of the
temporary matrix. The number of elements in each diagonal is exactly
Ncols
, after the function wraps past the edges of the matrix when
necessary. The function traverses diagonals so that the row index and column index both
increase. Each diagonal after the first one begins one row below the first element of
the previous diagonal.
If data
is a vector, it must have Nrows*Ncols
elements. If data
is a matrix with multiple rows and columns,
data
must have Nrows*Ncols
rows and the
function processes the columns independently.
To use this function as an inverse of the helscanintrlv
function, use the same Nrows
,
Ncols
, and hstep
inputs in both functions. In
that case, the two functions are inverses in the sense that applying
helscanintrlv
followed by helscandeintrlv
leaves data unchanged.
Examples
Extended Capabilities
Version History
Introduced before R2006a