Home > functions > device > meg > vb_meginfo_get_device.m

vb_meginfo_get_device

PURPOSE ^

return device from MEGinfo

SYNOPSIS ^

function [device] = vb_meginfo_get_device(meg_info)

DESCRIPTION ^

 return device from MEGinfo
 [usage]
   [device] = vb_meginfo_get_device(meg_info)
 [input]
   meg_info : <required> <<struct>> MEGinfo which must have 'device' field
 [output]
     device : <<string>> device name
 [note]

 [history]
   2008-02-08 (Sako) initial version

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [device] = vb_meginfo_get_device(meg_info)
0002 % return device from MEGinfo
0003 % [usage]
0004 %   [device] = vb_meginfo_get_device(meg_info)
0005 % [input]
0006 %   meg_info : <required> <<struct>> MEGinfo which must have 'device' field
0007 % [output]
0008 %     device : <<string>> device name
0009 % [note]
0010 %
0011 % [history]
0012 %   2008-02-08 (Sako) initial version
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 % --- CHECK ARGUMENTS --- %
0018 if ~exist('meg_info', 'var'), meg_info = []; end
0019 [meg_info] = inner_check_arguments(meg_info);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 if ~isfield(meg_info, 'device')
0024   device = '';
0025 else
0026   device = meg_info.device;
0027 end
0028 return;
0029 %
0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0031 
0032 % --- INNER FUNCTIONS -------------------------------------------------------- %
0033 %
0034 % --- inner_check_arguments()
0035 %
0036 function [meg_info] = inner_check_arguments(meg_info)
0037 func_ = mfilename;
0038 if isempty(meg_info)
0039   error('(%s)meg_info is a required parameter', func_);
0040 end
0041 return;
0042 %
0043 % --- end of inner_check_arguments()
0044 %
0045 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0046 
0047 
0048 
0049 %%% END OF FILE %%%

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005