% function to create plot of waveform % Usage: h=wp(wave,n,rate,string); % Peter Assmann - Aug 15, 1991 function h=wp(wave,n,rate,string); if ~exist('n','var'), n=length(wave); end; if ~exist('rate','var'), rate=10000; end; if ~exist('string','var'), string=''; end; m=min(n,length(wave)); w=(wave(1:m))/3276.8; ms=m/rate*1000; t=1:m; t=t'/(rate/1000); h=plot(t,w(1:m)); title(string); xlabel('Time (ms)'); ylabel('Amplitude'); axis([0 ms -10 10]); hold off;