deintrlv
Restore ordering of symbols
Description
restores the original ordering of the elements of deintrlved = deintrlv(data,elements)data by
acting as an inverse of intrlv.
Examples
Use the intrlv function to rearrange the elements of a vector to a random permutation vector determined by the randperm function. Use the deintrlv function to restore the element order of the initial vector by reusing the same random permutation vectorThis illustrates the inverse relationship between the intrlv and deintrlv functions.
Generate an input signal, data, and a permutation vector, elements.
data = 10:10:100
data = 1×10
10 20 30 40 50 60 70 80 90 100
elements = randperm(10) % Permutation vectorelements = 1×10
6 3 7 8 5 1 2 4 9 10
Permute the input signal according to the permutation vector by using the intrlv function and the restore the input signal order by using the deintrlv function.
a = intrlv(data,elements)
a = 1×10
60 30 70 80 50 10 20 40 90 100
b = deintrlv(a,elements)
b = 1×10
10 20 30 40 50 60 70 80 90 100
Use the intrlv function to rearrange the elements in the columns of a matrix to a random permutation vector determined by the randperm function. Use the deintrlv function to restore the element order of the initial matrix by reusing the same random permutation vector. This illustrates the inverse relationship between the intrlv and deintrlv functions.
Generate an input signal, data, and a permutation vector, elements.
data(:,1) = 10:10:100
data = 10×1
10
20
30
40
50
60
70
80
90
100
data(:,2) = 0.1:0.1:1
data = 10×2
10.0000 0.1000
20.0000 0.2000
30.0000 0.3000
40.0000 0.4000
50.0000 0.5000
60.0000 0.6000
70.0000 0.7000
80.0000 0.8000
90.0000 0.9000
100.0000 1.0000
elements = randperm(10) % Permutation vectorelements = 1×10
6 3 7 8 5 1 2 4 9 10
Permute the input signal according to the permutation vector by using the intrlv function, and then restore the input signal order by using the deintrlv function.
a = intrlv(data,elements)
a = 10×2
60.0000 0.6000
30.0000 0.3000
70.0000 0.7000
80.0000 0.8000
50.0000 0.5000
10.0000 0.1000
20.0000 0.2000
40.0000 0.4000
90.0000 0.9000
100.0000 1.0000
b = deintrlv(a,elements)
b = 10×2
10.0000 0.1000
20.0000 0.2000
30.0000 0.3000
40.0000 0.4000
50.0000 0.5000
60.0000 0.6000
70.0000 0.7000
80.0000 0.8000
90.0000 0.9000
100.0000 1.0000
Input Arguments
Input 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 length-N vector or an N-row matrix,
elements is a length-N vector that permutes the
integers from 1 to N. To use this function as an inverse of the
intrlv function, use the same
elements input in both functions. In that case, the
two functions are inverses in the sense that applying
intrlv followed by deintrlv
leaves data unchanged.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | fi
Complex Number Support: Yes
Permutation vector, specified as an integer vector. The permutation vector
specifies the mapping used to restore the input signal. The permutation
vector length must equal the input signal length and contain for each
integer k in the range [1
length(x,1)]. If
data is a length-N vector or an
N-row matrix, elements must be a
length-N vector and contain each integer in the range
[1 length(x,1)]. The sequence in
elements is the sequence in which elements from
data or its columns appear in
deintrlved.
Data Types: double
Output Arguments
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)