view m-toolbox/classes/@ao/findShortestVector.m @ 46:ca0b8d4dcdb6
database-connection-manager
Fix
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Tue, 06 Dec 2011 19:07:27 +0100 (2011-12-06)
parents
f0afece42f48
children
line source
+ − % findShortestVector Returns the length of the shortest vector in samples
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % DESCRIPTION: Returns the length of the shortest vector in samples
+ − %
+ − % CALL: lmin = findShortestVector(as)
+ − %
+ − % VERSION: $Id: findShortestVector.m,v 1.7 2009/12/22 22:32:12 mauro Exp $
+ − %
+ − % HISTORY: 14-05-07 M Hewitson
+ − % Creation
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − function lmin = findShortestVector(as)
+ −
+ − lmin = 1e20;
+ − for jj=1:numel(as)
+ − len_as = len(as(jj));
+ − if len_as < lmin
+ − lmin = len_as;
+ − end
+ − end
+ −
+ − end
+ −