Home > classes > @ao > findShortestVector.m

findShortestVector

PURPOSE ^

findShortestVector Returns the length of the shortest vector in samples

SYNOPSIS ^

function lmin = findShortestVector(as)

DESCRIPTION ^

 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.5 2008/08/01 13:19:42 ingo Exp $

 HISTORY: 14-05-07 M Hewitson
             Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % findShortestVector Returns the length of the shortest vector in samples
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: Returns the length of the shortest vector in samples
0005 %
0006 % CALL:        lmin = findShortestVector(as)
0007 %
0008 % VERSION:     $Id: findShortestVector.m,v 1.5 2008/08/01 13:19:42 ingo Exp $
0009 %
0010 % HISTORY: 14-05-07 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 function lmin = findShortestVector(as)
0015 
0016   lmin = 1e20;
0017   for j=1:length(as)
0018     len_as = len(as(j));
0019     if len_as < lmin
0020       lmin = len_as;
0021     end
0022   end
0023 
0024 end
0025

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003