Mercurial > hg > camir-aes2014
view toolboxes/bioakustik_tools/visualisation/datawavplot.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 source
function [h,out] = datawavplot(wavin, varargin) %[h,out] = datawavplot(data,'sr',fs,'minx',-1, 'maxx',-1,'color','k'); [sr,miny,maxy,minx,maxx,color,unused]=process_options(varargin,... 'sr',44800,'miny',-1,'maxy',-1,'minx',-1,'maxx',-1,'color','k'); 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=round(length(wavin)/sr*100)/100; timetbl=([0:length(wavin)-1]./length(wavin))*wavlens; h=plot(timetbl,out,color); if minx ==-1 minx=0; end if maxx==-1 maxx=wavlens; end axis([minx maxx miny maxy]); set(gca,'FontSize',8); h=get(0,'CurrentFigure'); axis xy; xlabel('Time[s]','FontSize',8) ylabel('Amplitude','FontSize',8)