LTPDA_FUNCHASH compute MD5 hash of an LTPDA function. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: LTPDA_FUNCHASH compute MD5 hash of an LTPDA function. CALL: h = ltpda_funchash(fcnname) INPUTS: fcnname - An LTPDA function name OUTPUTS: h - the hash string PARAMETERS: None. EXAMPLES: >> h = ltpda_funchash('ao'); VERSION: $Id: ltpda_funchash.html,v 1.7 2008/03/31 10:27:31 hewitson Exp $ HISTORY: 21-11-07 M Hewitson Creation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function h = ltpda_funchash(fcnname) 0002 0003 % LTPDA_FUNCHASH compute MD5 hash of an LTPDA function. 0004 % 0005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0006 % 0007 % DESCRIPTION: LTPDA_FUNCHASH compute MD5 hash of an LTPDA function. 0008 % 0009 % CALL: h = ltpda_funchash(fcnname) 0010 % 0011 % INPUTS: fcnname - An LTPDA function name 0012 % 0013 % OUTPUTS: h - the hash string 0014 % 0015 % PARAMETERS: None. 0016 % 0017 % EXAMPLES: 0018 % 0019 % >> h = ltpda_funchash('ao'); 0020 % 0021 % VERSION: $Id: ltpda_funchash.html,v 1.7 2008/03/31 10:27:31 hewitson Exp $ 0022 % 0023 % HISTORY: 21-11-07 M Hewitson 0024 % Creation. 0025 % 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 0028 ALGONAME = mfilename; 0029 VERSION = '$Id: ltpda_funchash.html,v 1.7 2008/03/31 10:27:31 hewitson Exp $'; 0030 0031 % Get filename 0032 s = which(fcnname); 0033 0034 % Read in file 0035 mfile = textread(s,'%s','delimiter','\n','whitespace',''); 0036 0037 % hash this 0038 h = ltpda_hash(char(mfile), 'MD5'); 0039