Brief description of M-files
c3dserver.m | itf = c3dserver() |
Activates C3DServer as a COM (COM.c3dserver_c3d), and returns 'itf' as a COM object for the server. |
|
openc3d.m | openc3d(itf, getoption, fname) |
Loads a C3D file into the C3DServer domain. itf = variable name used for COM object getoption = 1 for Windows dialog, other than 1 to enter filename fname = filename, with or without path and c3d extension Note: openc3d will handle 'fname' with or without the '.c3d' extension. 'fname' must be entered with directory path unless current MATLAB path is where the file is located. |
|
closec3d.m | closec3d(itf) |
Removes C3D file from the C3DServer domain. itf = variable name used for COM object. |
|
savec3d.m | savec3d(itf, newfname, filetype) |
Saves C3D file. itf = variable name used for COM object newfname = new filename to save, 'a' to save to open file filetype = Intel(1), DEC(2), SGI(3), existing type (-1) Note: 'newfname' and 'filetype' default to the name of the currently open file and the existing filetype if only 'itf' is entered as input. savec3d will handle 'newfname' with or without the '.c3d' extension. 'newfname' can be entered with directory path. |
|
createc3d.m | createc3d(itf,name,vfrt,nfram,nmkr,avr,achn,ftype,dtype,pscal) |
Creates C3D file with the input parameters. itf = variable name used for COM object name = name given to C3D file vfrt = video frame rate, must be > 0, default 120 nfram = number of frames, default 500 nmkr = number of markers, not < 0, default 20 avr = analog to video ratio, default 13 achn = number of analog channels, not < 0, default 28 ftype = Intel(1), DEC(2), SGI(3), default 1 dtype = Integer(1), Floating Point(2), default 2 pscal = point data scaling factor, must be > 0, default 0.1 Note: Only requires 2 inputs ('itf' and 'name') if user accepts defaults for other parameters. createc3d will handle 'name' with or without the '.c3d' extension. 'name' can be entered with directory path. |
|
nframes.m | frames = nframes(itf) |
Returns integer value of the number of video frames contained in an open C3D file. itf = variable name used for COM object frames = integer value of number of video frames in c3d file. |
|
analog2 … | truncated = analog2videoframes(itf, signals, index1, index2) |
videoframes.m | Truncates input signals to video frame rate. itf = variable name used for COM object signals = array to be truncated index1 = video start frame index, all frames if not used as an argument index2 = video end frame index, all frames if not used as an argument truncated = truncated signals array. |
get3dtarget.m | XYZPOS = get3dtarget(itf, signalname, residual, index1, index2) |
Returns nx4 array containing X,Y,Z trajectory data and residual. itf = variable name used for COM object signalname = string name of desired marker residual = Return matrix with point residual in column 4. 0 or no 3rd argument = false (returns nx3 with XYZ data only). 1 = true (returns nx4 with XYZ and residuals) index1 = start frame index, all frames if not used as an argument index2 = end frame index, all frames if not used as an argument XYZPOS = nx3/4 matrix with n frames and X, Y, Z, and/or residual as columns. |
|
get3dtargets.m | XYZPOS = get3dtargets(itf, residual, index1, index2) |
Returns structure containing all X,Y,Z trajectory data and residuals if chosen. itf = variable name used for COM object residual = Return matrix with point residual in column 4. 0 or no 3rd argument = false (returns nx3 with XYZ data only). 1 = true (returns nx4 with XYZ and residuals) index1 = start frame index, all frames if not used as an argument index2 = end frame index, all frames if not used as an argument XYZPOS = structure with target fields, x,y,z and/or residual columns. |
|
getanalog … | ACHANNEL = getanalogchannel(itf, signalname, index1, index2) |
channel.m | Returns nx1 array containing analog data. The returned analog data is scaled with offsets removed, but is in the force plate coordinate system. itf = variable name used for COM object signalname = string name of desired signal index1 = start frame index, all frames if not used as an argument index2 = end frame index, all frames if not used as an argument ACHANNEL = nx1 matrix of analog data. |
getanalog … | ACHANNEL = getanalogchannels(itf, index1, index2) |
channels.m | Returns structure with nx1 analog data fields. The returned analog data is scaled with offsets removed, but is in the force plate coordinate system. itf = variable name used for COM object index1 = start frame index, all frames if not used as an argument index2 = end frame index, all frames if not used as an argument ACHANNEL = structure with nx1 matrix of analog data fields (+units). |
getemg … | EMG = getemgchannels(itf,chanstart,chanend,type,index1,index2) |
channels.m | Returns emg data in raw or processed forms. itf = variable name used for COM object chanstart = first emg channel chanend = last emg channel type = 0 or no input for raw, 1 for FWR, 2 for LE (6Hz dual-pass) index1 = start frame index, all frames if not used as an argument index2 = end frame index, all frames if not used as an argument EMG = stucture with channel fields. |