H = hash;
H('key') = value; %assign value to key
v = H('key'); % retrieve value for a key
H.keys % return cell array of keys
H. values % return array of values
H.idx % returns sparse matrix of indexes
Remark:
The hash function used is sum of the key.
It can easily be changed if needed.
Zitieren als
Dimitar Atanasov (2026). Hash table declaration (https://de.mathworks.com/matlabcentral/fileexchange/26778-hash-table-declaration), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Language Fundamentals > Data Types > Tables >
- MATLAB > Language Fundamentals > Data Types > Dictionaries >
Mehr zu Tables finden Sie in Help Center und MATLAB Answers
Tags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
@hash/
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.0.0 |
