MATLAB ヘルプ センター
ディクショナリのエントリの削除
R2023b 以降
d2 = remove(d1,key)
d2 = remove(d1,key) は、ディクショナリ d1 から key に対応するエントリを削除します。
d2
d1
key
d = remove(d,key) は d(key) = [ ] と等価です。
d = remove(d,key)
d(key) = [ ]
例
すべて折りたたむ
複数のキーと値のペアを含むディクショナリを作成します。
names = ["Unicycle" "Bicycle" "Tricycle"]; wheels = [1 2 3]; d = dictionary(wheels,names)
d = dictionary (double ⟼ string) with 3 entries: 1 ⟼ "Unicycle" 2 ⟼ "Bicycle" 3 ⟼ "Tricycle"
2 に対応するエントリを削除します。
2
d = remove(d,2)
d = dictionary (double ⟼ string) with 2 entries: 1 ⟼ "Unicycle" 3 ⟼ "Tricycle"
[2,3] に対応するエントリを削除します。
[2,3]
d = remove(d,[2,3])
d = dictionary (double ⟼ string) with 1 entry: 1 ⟼ "Unicycle"
dictionary
入力ディクショナリ。dictionary オブジェクトとして指定します。
キー セット。配列として指定します。key のデータ型は d1 内のキーのデータ型と一致するか、これに変換可能でなければなりません。
すべて展開する
ディクショナリ remove 関数の C/C++ コードを生成できます。
remove
dictionary | insert | lookup | entries | keys | values | isKey | types | configureDictionary | isConfigured | numEntries
insert
lookup
entries
keys
values
isKey
types
configureDictionary
isConfigured
numEntries
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ