get keys in the table. [USAGE] [keys] = vb_table_get_keys(tbl); [IN] tbl : table data. [OUT] keys : key_list <Nx1 cell> Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [keys] = vb_table_get_keys(tbl) 0002 % get keys in the table. 0003 % [USAGE] 0004 % [keys] = vb_table_get_keys(tbl); 0005 % [IN] 0006 % tbl : table data. 0007 % [OUT] 0008 % keys : key_list <Nx1 cell> 0009 % 0010 % Copyright (C) 2011, ATR All Rights Reserved. 0011 % License : New BSD License(see VBMEG_LICENSE.txt) 0012 0013 % 0014 % --- Previous check 0015 % 0016 if ~exist('tbl', 'var') 0017 error('tbl is a required parameter.'); 0018 end 0019 0020 % 0021 % --- Main Procedure 0022 % 0023 keys = []; 0024 if ~isempty(tbl) 0025 keys = {tbl.key}; 0026 end