fn_hash

Contents

Syntax

h = fn_hash(input[,meth][,'char|hexa|HEXA|num'][,n])

Description

This function relies on function hash.m downloaded on Matlab File
Exchange.
It extends hash functionalities to structures and cell arrays
default method 'MD2' is used, input 'n' outputs n letters
Input:
- input   Matlab numerical array, cell array, or structure; subelements
          of cell arrays and structures must themselves be numerical
          arrays, cell arrays or structures
- meth    methods, default is 'MD2', see function brick/private/hash.m
- outtype 'char', 'hexa' or 'num' - indicates whether output will be a
          number or a word [default='char']
- n       number of digits of the hexadecimal hash number to return; if
          n=0, the default value is used (depends on method)
Output:
- h       the hash key corresponding to input; its value, type and length
          are controled by parameters meth, outtype and n
Note that structures with fields in different order give the same hash
key.

Source

Michael Kleder (function hash.m)

Copyright 2005-2007

Thomas Deneux

Copyright 2007-2017