-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJuncture.m
More file actions
56 lines (49 loc) · 1.57 KB
/
Juncture.m
File metadata and controls
56 lines (49 loc) · 1.57 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Core Model, 2022
% Written by Maya Davis
% Concept by Maya Davis and Melissa A. Redford
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% METHODS LIST
% Juncture
% MotorPlottingInfo
% PerceptualPlottingInfo
% PlotMotor
% PlotPerceptual
classdef Juncture
% A juncture consists of a point in motor space and a point in
% perceptual space, which here are just represented as their
% coordinates
%% PROPERTIES
properties
MotorPoint;
PerceptualPoint;
end
%% METHODS
methods
% Creating an object
function obj = Juncture(motorPoint, perceptualPoint)
obj.MotorPoint = motorPoint;
obj.PerceptualPoint = perceptualPoint;
end
% Getting info for plotting (motor)
function [x, y, color] = MotorPlottingInfo(obj, color)
x = obj.MotorPoint.x;
y = obj.MotorPoint.y;
end
% Getting info for plotting (perceptual)
function [x, y, color] = PerceptualPlottingInfo(obj, color)
x = obj.PerceptualPoint.x;
y = obj.PerceptualPoint.y;
end
% Plotting (motor)
function PlotMotor(obj, axes, color)
[x, y, color] = obj.MotorPlottingInfo(color);
scatter(axes, x, y, 100, color, "filled");
end
% Plotting (perceptual)
function PlotPerceptual(obj, axes, color)
[x, y, color] = obj.PerceptualPlottingInfo(color);
scatter(axes, x, y, 100, color, "filled");
end
end
end