-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotRes.m
39 lines (36 loc) · 1.41 KB
/
PlotRes.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
function m=PlotRes(X, sol)
% Cluster Centers
m = sol.Position;
k = size(m,1);
% Cluster Indices
ind = sol.Out.ind;
Colors = hsv(k);
for j=1:k
Xj = X(ind==j,:);
subplot(2,3,1)
plot(Xj(:,1),Xj(:,2),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,1),m(:,2),'ok','LineWidth',2,'MarkerSize',6);
subplot(2,3,2)
plot(Xj(:,1),Xj(:,3),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,1),m(:,3),'ok','LineWidth',2,'MarkerSize',6);
subplot(2,3,3)
plot(Xj(:,1),Xj(:,4),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,1),m(:,4),'ok','LineWidth',2,'MarkerSize',6);
subplot(2,3,4)
plot(Xj(:,2),Xj(:,3),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,2),m(:,3),'ok','LineWidth',2,'MarkerSize',6);
subplot(2,3,5)
plot(Xj(:,2),Xj(:,4),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,2),m(:,4),'ok','LineWidth',2,'MarkerSize',6);
subplot(2,3,6)
plot(Xj(:,3),Xj(:,4),'x','LineWidth',1,'Color',Colors(j,:));title('IWO');
hold on;
% plot(m(:,3),m(:,4),'ok','LineWidth',2,'MarkerSize',6);
end
hold off;
end