-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathik.m
43 lines (34 loc) · 1.08 KB
/
ik.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
classdef ik < handle
% IK - A class to store Inverse Kinematics results from OpenSim.
%
%
% Created by Megan Schroeder
% Last Modified 2014-03-19
%% Properties
% Properties for the ik class
properties (SetAccess = private)
Time
Data
end
properties (SetAccess = public)
Norm % Normalized to % of cycle (added in 'simulation' class)
end
%% Methods
% Methods for the ik class
methods
function obj = ik(subID,simName)
% IK - Construct instance of class
%
% IK path
ikPath = [OpenSim.getSubjectDir(subID),subID,'_',simName,'_IK.mot'];
% Import the file
ikimport = importdata(ikPath,'\t',11);
% Column headers
names = ikimport.colheaders(2:end);
% Time
obj.Time = ikimport.data(:,1);
% Data
obj.Data = dataset({ikimport.data(:,2:end),names{:}});
end
end
end