intrlv
シンボルのシーケンスの並べ替え
説明
例
インターリーブの適用によるベクトル データの並べ替えとデインターリーブの適用によるベクトル データの順序の復元
関数 intrlv
を使用して、ベクトルの要素を関数 randperm
で決定されたランダム置換ベクトルに再配置します。関数 deintrlv
を使用し、同じランダム置換ベクトルを再利用して、元のベクトルの要素の順序を復元します。これは、関数 intrlv
と関数 deintrlv
が逆の関係にあることを示します。
入力信号 data
、および置換ベクトル elements
を生成します。
data = 10:10:100
data = 1×10
10 20 30 40 50 60 70 80 90 100
elements = randperm(10) % Permutation vector
elements = 1×10
6 3 7 8 5 1 2 4 9 10
関数 intrlv
を使用し、置換ベクトルに基づいて入力信号を並べ替え、関数 deintrlv
を使用して入力信号の順序を復元します。
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
インターリーブの適用による行列データの並べ替えとデインターリーブの適用による行列データの順序の復元
関数 intrlv
を使用して、行列の列に含まれる要素を関数 randperm
で決定されたランダムな置換ベクトルに再配置します。関数 deintrlv
を使用し、同じランダム置換ベクトルを再利用して、元の行列の要素の順序を復元します。これにより、関数 intrlv
と関数 deintrlv
が逆の関係にあることを示します。
入力信号 data
、および置換ベクトル 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 vector
elements = 1×10
6 3 7 8 5 1 2 4 9 10
関数 intrlv
を使用し、置換ベクトルに基づいて入力信号を並べ替えてから、関数 deintrlv
を使用して入力信号の順序を復元します。
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
入力引数
data
— 入力信号
ベクトル | 行列
ベクトルまたは行列として指定される入力信号。data
が複数の行と列をもつ行列である場合、この関数は列を個別に処理します。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| fi
複素数のサポート: あり
elements
— 置換ベクトル
整数ベクトル
置換ベクトル。整数ベクトルとして指定します。この置換ベクトルは、入力信号 data
の並べ替えに使用するマッピングを指定します。置換ベクトルは、長さが入力信号の長さと等しくなければならず、範囲 [1 length
(data
,1)] の各整数 k が含まれていなければなりません。data
が長さ N のベクトルまたは N 行の行列である場合、elements
は長さ N のベクトルでなければならず、範囲 [1 length
(data
,1)] の各整数が含まれていなければなりません。elements
の順番は、data
の要素またはその列が intrlved
に表示される順番になります。
データ型: double
出力引数
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)