Home > m > helper > ltpda_funchash.m

ltpda_funchash

PURPOSE ^

LTPDA_FUNCHASH compute MD5 hash of an LTPDA function.

SYNOPSIS ^

function h = ltpda_funchash(fcnname)

DESCRIPTION ^

 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.m,v 1.1 2007/11/21 13:59:29 hewitson Exp $

 HISTORY: 21-11-07 M Hewitson
            Creation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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.m,v 1.1 2007/11/21 13:59:29 hewitson Exp $
0022 %
0023 % HISTORY: 21-11-07 M Hewitson
0024 %            Creation.
0025 %
0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0027 
0028 ALGONAME = mfilename;
0029 VERSION  = '$Id: ltpda_funchash.m,v 1.1 2007/11/21 13:59:29 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

Generated on Mon 31-Mar-2008 13:54:54 by m2html © 2003