Mercurial > hg > camir-aes2014
comparison toolboxes/bioakustik_tools/visualisation/datarawplot.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function [h,out] = datarawplot(wavin, varargin) | |
2 %[h,out] =datarawplot(data,'minx',-1, 'maxx',-1,'color','k','against',-1); | |
3 | |
4 | |
5 [miny,maxy,minx,maxx,color,against,unused]=process_options(varargin,... | |
6 'miny',-1,'maxy',-1,'minx',-1,'maxx',-1,'color','k','against',-1); | |
7 out= wavin; | |
8 | |
9 | |
10 m=min(wavin); | |
11 ma=max(wavin); | |
12 add=(ma-m)*0.1; | |
13 if miny ==-1 | |
14 miny=m-add; | |
15 end | |
16 if maxy==-1 | |
17 maxy=ma+add; | |
18 end | |
19 | |
20 wavlens=length(wavin); | |
21 | |
22 if against==-1 | |
23 h=plot(out,color); | |
24 else | |
25 h=plot(against,out,color); | |
26 end | |
27 | |
28 if minx ==-1 | |
29 minx=0; | |
30 if against ~=-1 | |
31 minx=min(against); | |
32 end | |
33 end | |
34 if maxx==-1 | |
35 maxx=wavlens; | |
36 if against ~=-1 | |
37 maxx=max(against); | |
38 end | |
39 end | |
40 axis([minx maxx miny maxy]); | |
41 set(gca,'FontSize',8); | |
42 h=get(0,'CurrentFigure'); | |
43 axis xy; | |
44 xlabel('Time[samples]','FontSize',8) | |
45 %ylabel('Amplitude','FontSize',8) |