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.
Citation pour cette source
Dimitar Atanasov (2026). Hash table declaration (https://fr.mathworks.com/matlabcentral/fileexchange/26778-hash-table-declaration), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R14
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Language Fundamentals > Data Types > Tables >
- MATLAB > Language Fundamentals > Data Types > Dictionaries >
En savoir plus sur Tables dans Help Center et MATLAB Answers
Tags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0.0 |
