diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/bioakustik_tools/visualisation/datarawplot.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,45 @@
+function [h,out] = datarawplot(wavin, varargin)
+%[h,out] =datarawplot(data,'minx',-1, 'maxx',-1,'color','k','against',-1);
+
+
+[miny,maxy,minx,maxx,color,against,unused]=process_options(varargin,...
+   'miny',-1,'maxy',-1,'minx',-1,'maxx',-1,'color','k','against',-1);
+out= wavin;
+
+
+m=min(wavin);
+ma=max(wavin);
+add=(ma-m)*0.1;
+if miny ==-1
+    miny=m-add;
+end
+if maxy==-1
+    maxy=ma+add;
+end
+    
+wavlens=length(wavin);
+
+if against==-1
+    h=plot(out,color);
+else
+    h=plot(against,out,color);
+end
+
+if minx ==-1
+    minx=0;
+    if against ~=-1
+         minx=min(against);
+    end
+end
+if maxx==-1
+    maxx=wavlens;
+    if against ~=-1
+         maxx=max(against);
+    end
+end
+axis([minx maxx miny maxy]);
+set(gca,'FontSize',8);
+h=get(0,'CurrentFigure');
+axis xy;
+xlabel('Time[samples]','FontSize',8)
+%ylabel('Amplitude','FontSize',8)