annotate demo/plot_sai.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 74dedb26614d
children
rev   line source
tomwalters@0 1 % demonstration file for 'aim-mat'
tomwalters@0 2 %
tomwalters@0 3 % (c) 2006-2008, University of Cambridge, Medical Research Council
tomwalters@0 4 % Written by Tom Walters (tcw24@cam.ac.uk)
tomwalters@0 5 % http://www.pdn.cam.ac.uk/cnbh/aim2006
tomwalters@0 6 % $Date: 2008-06-10 18:00:16 +0100 (Tue, 10 Jun 2008) $
tomwalters@0 7 % $Revision: 585 $
tomwalters@0 8
tomwalters@0 9 function plot_sai(input, current_frame_number, current_scale, titlestr)
tomwalters@0 10 %hand_scaling=1;
tomwalters@0 11
tomwalters@0 12
tomwalters@0 13 sai=input.data.sai;
tomwalters@0 14 current_frame=sai{current_frame_number};
tomwalters@0 15 allmax=getallmaxvalue(current_frame);
tomwalters@0 16 str=get_graphics_options(input,input.info.current_sai_module);
tomwalters@0 17 str.extra_options=getfield(input.all_options.sai,input.info.current_sai_module);
tomwalters@0 18 nrchan=getnrchannels(current_frame);
tomwalters@0 19 % if do_single_channel || nrchan==1
tomwalters@0 20 % current_frame=current_frame;
tomwalters@0 21 % sig=getsinglechannel(current_frame,options.display_single_channel);
tomwalters@0 22 % h=plot(sig,str);set(gca,'YAxisLocation','right');
tomwalters@0 23 % set(gca,'YLim',[0 allmax*1.1]);
tomwalters@0 24 % else
tomwalters@0 25 hand=plot(current_frame,str);
tomwalters@0 26 %%% TCW - AIM2006
tomwalters@0 27 %zmin=0;zmax=50/current_scale;
tomwalters@0 28 zmin=0;zmax=(max(current_frame)+eps*1000)/current_scale;
tomwalters@0 29 %%%
tomwalters@0 30
tomwalters@0 31 %TCW AIM 2006
tomwalters@0 32 % if hand_scaling == 1
tomwalters@0 33 set(gca,'Zlim',[zmin,1/current_scale]);
tomwalters@0 34 % else
tomwalters@0 35 % set(gca,'Zlim',[zmin,zmax]);
tomwalters@0 36 % end
tomwalters@0 37
tomwalters@0 38 %set(gca,'Zlim',[zmin,zmax]);
tomwalters@0 39 %if strcmp(handles.screen_modus,'paper')
tomwalters@0 40 % par=get(hand,'parent');
tomwalters@0 41 % set(par,'FontSize',12);xlab=get(par,'xlabel');set(xlab,'FontSize',12);ylab=get(par,'ylabel');set(ylab,'FontSize',12);
tomwalters@0 42 %end
tomwalters@0 43 % end
tomwalters@0 44 xlabel('time interval (ms)');ylabel('Frequency (kHz)');title(titlestr);