comparison m-toolbox/classes/@ao/findShortestVector.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % findShortestVector Returns the length of the shortest vector in samples
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: Returns the length of the shortest vector in samples
5 %
6 % CALL: lmin = findShortestVector(as)
7 %
8 % VERSION: $Id: findShortestVector.m,v 1.7 2009/12/22 22:32:12 mauro Exp $
9 %
10 % HISTORY: 14-05-07 M Hewitson
11 % Creation
12 %
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14 function lmin = findShortestVector(as)
15
16 lmin = 1e20;
17 for jj=1:numel(as)
18 len_as = len(as(jj));
19 if len_as < lmin
20 lmin = len_as;
21 end
22 end
23
24 end
25