-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathfigure50.m
46 lines (36 loc) · 1.28 KB
/
figure50.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
44
45
46
function figure50
global dPARAMS dHANDLES p
figure(dHANDLES.spectrafig);clf
dHANDLES.h50 = gca;
if ~isempty(dPARAMS.trueTimes)
% plot average true click spectrum
plot(dHANDLES.h50,dPARAMS.ft,dPARAMS.trueSpec,'Linewidth',4)
end
if dPARAMS.ff2 % average false click spec
% plot average false click spectrum
hold(dHANDLES.h50, 'on')
plot(dHANDLES.h50,dPARAMS.ft,dPARAMS.SPEC2,'r','Linewidth',4)
hold(dHANDLES.h50, 'off')
end
if dPARAMS.ff3 % average id click spec
hold(dHANDLES.h50, 'on')
hID = plot(dHANDLES.h50,dPARAMS.ft,dPARAMS.specID_norm,'Linewidth',4);
for iC = 1:length(hID) % set colors
set(hID(iC),'Color',p.colorTab(dPARAMS.specIDs(iC),:))
end
hold(dHANDLES.h50, 'off')
end
% add figure labels
xlabel(dHANDLES.h50,'Frequency (kHz)');
ylabel(dHANDLES.h50,'Normalized Received Level')
grid(dHANDLES.h50,'on')
xlim(dHANDLES.h50, 'manual');
ylim(dHANDLES.h50,[0 1]);
xlim(dHANDLES.h50,[p.fLow,p.fHi])
if ~isempty(dPARAMS.yell) && ~isempty(dPARAMS.csnJ)
hold(dHANDLES.h50,'on') % add click to spec plot in BLACK
cspJy = mean(dPARAMS.cspJ(dPARAMS.yell,:),1);
tSPEC = norm_spec_simple(cspJy,dPARAMS.fimint,dPARAMS.fimaxt);
plot(dHANDLES.h50,dPARAMS.ft,tSPEC,'k','Linewidth',4);
hold(dHANDLES.h50,'off')
end