Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of edl_check_internalindices
Home > sltoolbox > ExpDL > edl_check_internalindices.m

edl_check_internalindices

PURPOSE ^

EDL_CHECK_INTERNALINDICES Checks the consistency of internal indices

SYNOPSIS ^

function cprops = edl_check_internalindices(props)

DESCRIPTION ^

EDL_CHECK_INTERNALINDICES Checks the consistency of internal indices
 
 $ Syntax $
   - cprops = edl_check_internalindices(props)

 $ Arguments $
   - props:        the struct array of property entries
   - cprops:       the converted array with all indices coverted to
                   numeric

 $ History $
   - Created by Dahua Lin, on Aug 14, 2006

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:

SOURCE CODE ^

0001 function cprops = edl_check_internalindices(props)
0002 %EDL_CHECK_INTERNALINDICES Checks the consistency of internal indices
0003 %
0004 % $ Syntax $
0005 %   - cprops = edl_check_internalindices(props)
0006 %
0007 % $ Arguments $
0008 %   - props:        the struct array of property entries
0009 %   - cprops:       the converted array with all indices coverted to
0010 %                   numeric
0011 %
0012 % $ History $
0013 %   - Created by Dahua Lin, on Aug 14, 2006
0014 %
0015 
0016 
0017 cprops = props;
0018 
0019 if ~isempty(props)
0020     
0021     n = length(props);
0022 
0023     if ~isfield(props, 'internal_index')
0024         error('edl:parseerror', ...
0025             'The entries do not have the required field: internal_index');
0026     end
0027 
0028     for i = 1 : n
0029         curidx = str2double(props(i).internal_index);
0030         if curidx ~= i
0031             error('edl:parseerror', ...
0032                 'Internal index inconsistency');
0033         end
0034         cprops(i).internal_index = curidx;
0035     end
0036 
0037 end

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com