Main Content

matdeintrlv

R2026b

Restore ordering of symbols filling matrix by columns and emptying it by rows

Description

deintrlvd = matdeintrlv(data,Nrows,Ncols) rearranges the elements in data by filling a temporary Nrows-by-Ncols matrix with the elements column by column and then sending the matrix contents, row by row, to the output.

To use this function as an inverse of the matintrlv function, use the same Nrows and Ncols inputs in both functions. In that case, applying matintrlv followed by matdeintrlv leaves data unchanged.

example

Examples

collapse all

Show the inverse relationship between matintrlv and matdeintrlv.

Define the number of rows and columns for matrix interleaving and specify an input data matrix.

Nrows = 2;
Ncols = 3;
data = [1 2 3 4 5 6; 2 4 6 8 10 12]'
data = 6×2

     1     2
     2     4
     3     6
     4     8
     5    10
     6    12

Interleave the input data matrix and display the resulting output a.

a = matintrlv(data,Nrows,Ncols)
a = 6×2

     1     2
     4     8
     2     4
     5    10
     3     6
     6    12

Deinterleave a and display b to show that the output matches the original data input to the interleaver.

b = matdeintrlv(a,Nrows,Ncols)
b = 6×2

     1     2
     2     4
     3     6
     4     8
     5    10
     6    12

Input Arguments

collapse all

Interleaved signal, specified as a vector or matrix. If data is a matrix with multiple rows and columns, the function processes the columns independently.

  • 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.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32
Complex Number Support: Yes

Number of rows in the temporary matrix, specified as a positive integer.

Number of columns in the temporary matrix, specified as a positive integer.

Output Arguments

collapse all

Deinterleaved data, returned with the same dimensions and data type as the input data.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Version History

Introduced before R2006a

See Also