getter of Headinfo.Nvertex [usage] nvertex = vb_headinfo_get_nvertex(Headinfo) [input] Headinfo : <required> <<struct>> : if this does not have target field, return empty ([]). [output] nvertex : Headinfo.Nvertex [note] [history] 2007-04-06 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function nvertex = vb_headinfo_get_nvertex(Headinfo) 0002 % getter of Headinfo.Nvertex 0003 % [usage] 0004 % nvertex = vb_headinfo_get_nvertex(Headinfo) 0005 % [input] 0006 % Headinfo : <required> <<struct>> 0007 % : if this does not have target field, return empty ([]). 0008 % [output] 0009 % nvertex : Headinfo.Nvertex 0010 % [note] 0011 % 0012 % [history] 0013 % 2007-04-06 (Sako) initial version 0014 % 0015 % Copyright (C) 2011, ATR All Rights Reserved. 0016 % License : New BSD License(see VBMEG_LICENSE.txt) 0017 0018 % --- CHECK ARGUMENTS --- % 0019 if ~exist('Headinfo', 'var') Headinfo = []; end; 0020 [Headinfo] = inner_check_arguments(Headinfo); 0021 0022 % --- MAIN PROCEDURE --------------------------------------------------------- % 0023 % 0024 nvertex = Headinfo.Nvertex; 0025 % 0026 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0027 0028 % --- INNER FUNCTIONS -------------------------------------------------------- % 0029 % 0030 function [Headinfo] = inner_check_arguments(Headinfo) 0031 if isempty(Headinfo) 0032 error('Headinfo is a required parameter'); 0033 end 0034 0035 if ~isfield(Headinfo, 'Nvertex') Headinfo.Nvertex = []; end; 0036 % 0037 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0038 0039 %%% END OF FILE %%%