ccc_callMatlabComServer


Custom Channel Configuration Function: ccc_callMatlabComServer


Description:

This function calls an external MATLAB function using a MATLAB COM 

server instance. 


NOTE: THIS REQUIRED TO HAVE A LICENSED VERSION OF MATLAB TO BE INSTALLED 

       ON THE COMPUTER!


NOTE: MATLAB DOES NOT SUPPORT THE FOLLOWING COM INTERFACE TYPES!

          - Structure 

          - Sparse array

          - Multidimensional SAFEARRAYs (greater than two dimensions)

          - Write-only properties

      see: mathworks.com/help/matlab/matlab_external/handling-com-data-in-matlab-software.html


Syntax:  varargout = callMatlabComServer(file, matVer, comMode, nOut, varargin)


Inputs:

   file:       [1xN char]   absolute filename to .m file

   matVer:     [1x1 char]   MATLAB version that should be called

                                    (leave empty to use the most recent

                                    version)

   comMode:    [1x1 char]   COM server mode

                                    - desktop: Starts the full desktop 

                                               MATLAB version

                                    - cmd:     Starts a command window 

                                               version

   nOut:       [1x1 double] number of output arguments

   varargin:   [-]          variable amount of input arguments, passed to

                             the function that is called


Outputs:

   varargout:  [-]          variable amount of output arguments