function plot_sp( num_std, DRAWALL ) if (~exist('num_std')) num_std = 5; end if (~exist('DRAWALL')) DRAWALL = 0; end load( sprintf( 'sp%d_data_ext', num_std ) ); fig = 565; figure( fig+1 ); clf; if ( DRAWALL ) starting_channel = 1; figure( fig ); clf; else starting_channel = 25; end for channel = starting_channel:64 z = z_data(:,channel); sp = sp_data{channel}; if ( channel < 25 ) subplot(3,8,channel); else figure( fig+1 ); subplot(5,8,channel-24); end plot( sp_t, z ); hold on; plot( [sp_t(1) sp_t(end)], [threshold(channel) threshold(channel)], 'g' ); plot( [sp_t(1) sp_t(end)], [-threshold(channel) -threshold(channel)], 'g' ); plot( sp, zeros(length(sp),1), 'rx' ); axis tight; AX = axis; tx = text( 0.6*AX(1)+0.4*AX(2), 0.95*AX(3)+0.05*AX(4), ... sprintf( 'Ch %d', channel ) ); set( tx, 'fontsize', 10, 'fontweight', 'bold' ); drawnow; end