Home > functions > device > acqdata > vb_posfile_get_sensorinfo.m

vb_posfile_get_sensorinfo

PURPOSE ^

<<loader>> return sensor position and coordinate types from POS-MAT file

SYNOPSIS ^

function [pos, coord_type] = vb_posfile_get_sensorinfo(posfile)

DESCRIPTION ^

 <<loader>> return sensor position and coordinate types from POS-MAT file
 [usage]
   [pos, coord_type] = vb_posfile_get_sensorinfo(posfile)
 [input]
    posfile : <required> <<file>> POS-MAT file
 [output]
          pos : coordinates of sensor position [Nch x3 double]
   coord_type : coordinate type before transforming [x1 string]
 [note]
   now on specify
 [history]
   2008-02-25 (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 [pos, coord_type] = vb_posfile_get_sensorinfo(posfile)
0002 % <<loader>> return sensor position and coordinate types from POS-MAT file
0003 % [usage]
0004 %   [pos, coord_type] = vb_posfile_get_sensorinfo(posfile)
0005 % [input]
0006 %    posfile : <required> <<file>> POS-MAT file
0007 % [output]
0008 %          pos : coordinates of sensor position [Nch x3 double]
0009 %   coord_type : coordinate type before transforming [x1 string]
0010 % [note]
0011 %   now on specify
0012 % [history]
0013 %   2008-02-25 (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('posfile', 'var'), posfile = ''; end
0020 [posfile] = inner_check_arguments(posfile);
0021 
0022 % --- MAIN PROCEDURE --------------------------------------------------------- %
0023 %
0024 pos = [];
0025 coord_type = '';
0026 
0027 load(posfile, 'pos', 'coord_type');
0028 return;
0029 %
0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0031 
0032 % --- INNER FUNCTIONS -------------------------------------------------------- %
0033 %
0034 % --- inner_check_arguments()
0035 %
0036 function [posfile] = inner_check_arguments(posfile)
0037 func_ = mfilename;
0038 if isempty(posfile)
0039   error('(%s)posfile is a required parameter', func_);
0040 end
0041 if exist(posfile, 'file') ~= 2
0042   error('(%s)cannot find posfile : %s', func_);
0043 end
0044 return;
0045 %
0046 % --- end of inner_check_arguments()
0047 %
0048 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0049 
0050 %%% END OF FILE %%%

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