最小値の計算
3 行 2 列の行列入力 dsp_examples_u の最小値をMinimumブロックを使用して計算します。
モデルを開きます。
model = 'ex_minimum_ref';
open_system(model)

Minimum ブロックの [モード] パラメーターは、Value and Index に設定されています。ブロックは入力をフレーム サイズが 3 の 2 チャネル信号として処理します。
モデルを実行します。入力値と出力値を表示します。
sim(model) disp('Data Input') disp(dsp_examples_u) disp('Minimum Values') disp(min_val) disp('Min Index Array') disp(min_index)
Data Input
6 1
1 3
3 9
-7 2
2 4
5 1
8 6
0 2
-1 5
-3 0
2 4
1 17
Minimum Values
1 1
-7 1
-1 2
-3 0
0 0
0 0
Min Index Array
2 1
1 3
3 2
1 1
1 1
1 1
Value and Index モードでは、ブロックは次を出力します。
チャネルに沿った各データ フレームの最小値。
それぞれのフレーム内の最小値のインデックス。
モデルを閉じます。
close_system(model)