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_bmm(input, options, current_scale,titlestr)
|
tomwalters@0
|
10
|
tomwalters@0
|
11 start_time=options.minimum_time;
|
tomwalters@0
|
12 stop_time=options.maximum_time;
|
tomwalters@0
|
13
|
tomwalters@0
|
14 current_frame=input.data.bmm;
|
tomwalters@0
|
15 str=get_graphics_options(input,input.info.current_bmm_module);
|
tomwalters@0
|
16 str.minimum_time_interval=start_time;
|
tomwalters@0
|
17 str.maximum_time_interval=stop_time;
|
tomwalters@0
|
18 nrchan=getnrchannels(input.data.bmm);
|
tomwalters@0
|
19 % if do_single_channel || nrchan==1
|
tomwalters@0
|
20 % sig=getsinglechannel(current_frame,options.display_single_channel);
|
tomwalters@0
|
21 % % sig=getpart(sig,start_time,stop_time);
|
tomwalters@0
|
22 % ymin=min(current_frame)*1.1;ymax=max(current_frame)*1.1;
|
tomwalters@0
|
23 % plot(sig,[start_time stop_time ymin ymax]);
|
tomwalters@0
|
24 % set(gca,'Ylim',[ymin,ymax]);set(gca,'YAxisLocation','right');
|
tomwalters@0
|
25 % xlabel('time (ms)');ylabel('amplitude');title('');
|
tomwalters@0
|
26 % else
|
tomwalters@0
|
27 hand=plot(current_frame,str);
|
tomwalters@0
|
28 zmin=min(current_frame)/current_scale;zmax=max(current_frame)/current_scale;
|
tomwalters@0
|
29
|
tomwalters@0
|
30 %set(gca,'Zlim',[zmin,zmax]);
|
tomwalters@0
|
31
|
tomwalters@0
|
32 % %TCW AIM 2006
|
tomwalters@0
|
33 % if hand_scaling == 1
|
tomwalters@0
|
34 set(gca,'Zlim',[0,1/current_scale]);
|
tomwalters@0
|
35 % else
|
tomwalters@0
|
36 % %TCW AIM 2006 to get this frequency axis correct, this lower
|
tomwalters@0
|
37 % %limit of the z axis really needs to be zero
|
tomwalters@0
|
38 % set(gca,'Zlim',[0,zmax]);
|
tomwalters@0
|
39 % end
|
tomwalters@0
|
40
|
tomwalters@0
|
41 xlabel('time (ms)');ylabel('Frequency (kHz)');title(titlestr);
|
tomwalters@0
|
42 % if strcmp(handles.screen_modus,'paper')
|
tomwalters@0
|
43 % par=get(hand,'parent');
|
tomwalters@0
|
44 % set(par,'FontSize',12);xlab=get(par,'xlabel');set(xlab,'FontSize',12);ylab=get(par,'ylabel');set(ylab,'FontSize',12);
|
tomwalters@0
|
45 % end
|
tomwalters@0
|
46 %end
|