unique
説明
は、uniqueinterval
= unique(interval
)fixed.Interval
オブジェクト interval
として設定される等価値を表し、段階的に並べ替えられるオーバーラップしない区間のベクトルを返します。
例
Interval
オブジェクトの配列からオーバーラップしない区間のセットを作成
関数 unique
を使用して、Interval
オブジェクトの配列からオーバーラップしない区間のセットを取得します。
intervals = fixed.Interval({-5,5},{-10,10},{4,20},{50,100})
[-5,5] [-10,10] [4,20] [50,100] 1x4 fixed.Interval with properties: LeftEnd RightEnd IsLeftClosed IsRightClosed
オブジェクトで表される最初の 3 つの区間は互いにオーバーラップします。4 番目の区間はセットから結合解除されます。
uniqueInterval = unique(intervals)
uniqueInterval = [-10,20] [50,100] 1x2 fixed.Interval with properties: LeftEnd RightEnd IsLeftClosed IsRightClosed
出力 uniqueInterval
、2 つの Interval
オブジェクトの配列は、3 つのオーバーラップする区間を 1 つの Interval
オブジェクトにマージします。
入力引数
interval
— fixed.Interval
オブジェクト
fixed.Interval
オブジェクト | fixed.Interval
オブジェクトの配列
入力 fixed.Interval
オブジェクト。fixed.Interval
オブジェクト、または fixed.Interval
オブジェクトの配列として指定します。
出力引数
uniqueinterval
— オーバーラップしない Interval
オブジェクトのセット
fixed.Interval
オブジェクト | fixed.Interval
オブジェクトの配列
オーバーラップしない Interval
オブジェクトのセット。fixed.Interval
オブジェクトまたは fixed.Interval
オブジェクトの配列として返されます。
interval
がスカラー Interval
オブジェクトの場合、出力は入力と同じです。
バージョン履歴
R2019b で導入
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)