Repository navigation
Expand file tree
/
Copy pathplot_endmembers.m
More file actions
executable file
·76 lines (62 loc) · 1.95 KB
/
Copy pathplot_endmembers.m
File metadata and controls
executable file
·76 lines (62 loc) · 1.95 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
% close all
% clc
% plot the involved endmembers in a multi-event cases.
labelsize = 20;
fontsize = 18;
%% before post-processing
% gt = members_old{1};
% lt = members_old{2};
% ls = members_old{3};
linewidth = 2;
% figure
% hold on
% if ~isempty(gt)
% stem(gt(:,2),gt(:,1),'r','LineWidth',linewidth);
% end
% if ~isempty(lt)
% stem(lt(:,2),lt(:,1),'b','LineWidth',linewidth);
% end
% if ~isempty(ls)
% stem(ls(:,2),ls(:,1),'Color',[.45 .45 0],'LineWidth',linewidth);
% end
% ylabel('Sparse Coefficient', 'Fontsize', labelsize)
% xlabel('Time (s)', 'Fontsize', labelsize)
% set(gca,'YLim',[-.04,1])
% set(gca,'XLim',[0,19])
% set(gca,'XTick',[0:2:19])
% set(gca,'XTickLabel',[0:2:19])
% % legend([h1 h2 h3],'GT','LT','LS')
% h1 = stem(100,0,'r','LineWidth',linewidth);
% h2 = stem(100,0,'b','LineWidth',linewidth);
% h3 = stem(100,0,'Color',[.45 .45 0],'LineWidth',linewidth);
% legend([h1 h2 h3],'GT','LT','LS','Location','Northeast')
% set(gca, 'Fontsize', fontsize);
%% after post-processing
gt = members{1};
lt = members{2};
ls = members{3};
figure
hold on
% h1 = stem(gt(:,2),gt(:,1),'r','LineWidth',1);
% h2 = stem(lt(:,2),lt(:,1),'b','LineWidth',1);
% h3 = stem(ls(:,2),ls(:,1),'Color',[.45 .45 0],'LineWidth',1);
if ~isempty(gt)
stem(gt(:,2),gt(:,1),'r','LineWidth',linewidth);
end
if ~isempty(lt)
stem(lt(:,2),lt(:,1),'b','LineWidth',linewidth);
end
if ~isempty(ls)
stem(ls(:,2),ls(:,1),'Color',[.45 .45 0],'LineWidth',linewidth);
end
ylabel('Sparse Coefficient', 'Fontsize', labelsize)
xlabel('Time (s)', 'Fontsize', labelsize)
set(gca,'YLim',[-.04,1])
set(gca,'XLim',[0,19])
set(gca,'XTick',[0:2:19])
set(gca,'XTickLabel',[0:2:19])
h1 = stem(100,0,'r','LineWidth',linewidth);
h2 = stem(100,0,'b','LineWidth',linewidth);
h3 = stem(100,0,'Color',[.45 .45 0],'LineWidth',linewidth);
legend([h1 h2 h3],'GT','LT','LS','Location','Northeast')
set(gca, 'Fontsize', fontsize);