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.
Citar como
Dimitar Atanasov (2024). Hash table declaration (https://www.mathworks.com/matlabcentral/fileexchange/26778-hash-table-declaration), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R14
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- MATLAB > Language Fundamentals > Data Types > Tables >
- MATLAB > Language Fundamentals > Data Types > Dictionaries >
Más información sobre Tables en Help Center y MATLAB Answers.
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
@hash/
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |