Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@prog/funchash.m @ 46:ca0b8d4dcdb6 database-connection-manager
Fix
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 19:07:27 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
function h = funchash(fcnname) % FUNCHASH compute MD5 hash of a MATLAB m-file. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: FUNCHASH compute MD5 hash of a MATLAB m-file. % % CALL: h = funchash(mfile_name) % % INPUTS: fcnname - The name of an m-file. % % The first file found by 'which' is hashed. % % OUTPUTS: h - the hash string % % PARAMETERS: None. % % EXAMPLES: % % >> h = funchash('ao'); % % VERSION: $Id: funchash.m,v 1.1 2008/06/18 13:35:11 hewitson Exp $ % % HISTORY: 21-11-07 M Hewitson % Creation. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Get filename s = which(fcnname); % Read in file mfile = textread(s,'%s','delimiter','\n','whitespace',''); % hash this h = ltpda_hash(char(mfile), 'MD5');