I am working on matlab to analyse whale recordings (I have to mark every breath). For this purpose I have a tool (programmed by an expert) which shows sections of 100 seconds plotting the sound (frequency) and the depth of the animal. When you press 'f', the next section (next 100 seconds) is shown, and so on.
When you press 'p', the audio of the section is played. I want to be able to track the audio display, so I have thought I could plot a real-time moving red vertical line, meaning: it starts at t=0 and ends at t=100.
This is the coding for the 'p' function in which I think I would have to incorporate the ploting of the real-time red vertical line.
chk = min(size(x,2),2) ;
xf = filter(bs,as,x(:,1:chk)) ;