-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVisualize2.m
More file actions
56 lines (47 loc) · 1.75 KB
/
Copy pathVisualize2.m
File metadata and controls
56 lines (47 loc) · 1.75 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
function Visualize2(X, Y, E, F, k)
if k==4
k1=2; k2=2;
elseif k==2
k1=1; k2=2;
end
figure;
X=X'; Y=Y'; E=E'; F=F';
%Show the original manifolds
subplot(k1,k2,1);
plot3(X(:,1), X(:,2), X(:,3),'r-', 'LineWidth',2);
hold on;
plot3(Y(:,1), Y(:,2), Y(:,3),'b-', 'LineWidth',2);
title({['(A) Comparison of Manifold 1 and 2 (Before Alignment)']});
xlabel('X', 'FontSize',14, 'FontWeight', 'bold');
ylabel('Y', 'FontSize',14, 'FontWeight', 'bold');
zlabel('Z', 'FontSize',14, 'FontWeight', 'bold');
% 3D
subplot(k1,k2,2);
plot3(E(:,1), E(:,2), E(:,3),'r-', 'LineWidth',2);
hold on;
plot3(F(:,1), F(:,2), F(:,3),'b-', 'LineWidth',2);
title({['(B) Comparison of Manifold 1 and 2 (After 3D Alignment)']});
xlabel('X', 'FontSize',14, 'FontWeight', 'bold');
ylabel('Y', 'FontSize',14, 'FontWeight', 'bold');
zlabel('Z', 'FontSize',14, 'FontWeight', 'bold');
if k==4
% 2D
subplot(k1,k2,3);
plot(E(:,1), E(:,2), 'r-', 'LineWidth',2);
hold on;
plot(F(:,1), F(:,2), 'b-', 'LineWidth',2);
title({['(C) Comparison of Manifold 1 and 2 (After 2D Alignment)']});
xlabel('X', 'FontSize',14, 'FontWeight', 'bold');
ylabel('Y', 'FontSize',14, 'FontWeight', 'bold');
zlabel('Z', 'FontSize',14, 'FontWeight', 'bold');
% 1D
subplot(k1,k2,4);
plot(E(:,1), 'r-', 'LineWidth',2);
hold on;
plot(F(:,1), 'b-', 'LineWidth',2);
title({['(D) Comparison of Manifold 1 and 2 (After 1D Alignment)']});
xlabel('X', 'FontSize',14, 'FontWeight', 'bold');
ylabel('Y', 'FontSize',14, 'FontWeight', 'bold');
zlabel('Z', 'FontSize',14, 'FontWeight', 'bold');
end
end