contains
説明
は bool
= contains(A, B
)fixed.Interval
オブジェクト A
に fixed.Interval
オブジェクト B
が含まれているかどうかを示す boolean を返します。
例
fixed.Interval
オブジェクトにもう一方が含まれているかどうかの判別
2 つの fixed.Interval
オブジェクトを作成します。関数 contains
を使用して、interval2
の区間が、対応する interval1
の区間内に含まれているかどうかを判別します。
interval1 = fixed.Interval({0,1}, {2,3}, {3,4}); interval2 = fixed.Interval({0,0.5}, {2.5, 3}, {4,5}); bool = contains(interval1, interval2)
bool = 1x3 logical array
1 1 0
2 番目の入力がスカラー Interval
オブジェクトである場合、contains
は最初の入力の各区間に 2 番目の入力の区間が含まれているかどうかを判別します。
interval2 = fixed.Interval(0,1); bool = contains(interval1, interval2)
bool = 1x3 logical array
1 0 0
入力引数
A, B
— 入力 fixed.Interval
オブジェクト
fixed.Interval
オブジェクト | fixed.Interval
オブジェクトの配列
入力 fixed.Interval
オブジェクト。fixed.Interval
オブジェクト、または fixed.Interval
オブジェクトの配列として指定します。
A
が Interval
オブジェクトの配列である場合、B
は A
と同じ次元をもつスカラー Interval
オブジェクトまたは Interval
オブジェクトでなければなりません。
出力引数
bool
— B
が A
に含まれているかどうか
true | false | logical 配列
fixed.Interval
オブジェクト B
が fixed.Interval
オブジェクト A
に含まれているかどうか。logical 値として返されます。
A
が Interval
の配列である場合、出力は A
と同じサイズの logical 値の配列です。
バージョン履歴
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)