Chapter 1: temporal profile plots
Chapter 1: temporal profile plots
There are two common types of spatiotemporal plot: one showing the temporal evolution of an experimental variable (e.g.,showing fingertip or eye position as a function of time), and a raster plot. Temporal evolution plots can be created as a straightforward scatterplot using the plot command. For example, we could create a simulated eye movement (‘saccade’) in the following way: First we define an acceleration profile. A saccade acceleration profile describes the acceleration-deceleration pair of a single saccade. We can roughly simulate this with one cycle of a sine wave:
t=linspace(0,.1,101); %100ms saccade duration
where, we first create a time variable (t) that contains a linearly spaced set of 101 values from 0 to 0.1 (i.e., we will simulate acceleration values at times from 0 to .1 s in 1 ms intervals). A single 100 ms cycle of a sinewave can be created with the command:
at=7400*sin(2*pi*t/.1); %simulated acceleration profile
where the peak acceleration is set at 2000 degrees/s
Thus, a temporal evolution plot simulating saccade acceleration may be created by:
figure; subplot(3,1,1); plot(t,at,'k:','LineWidth',1.2);
The velocity profile associated with this sinusoidal acceleration profile is:
vt=cumtrapz(at)*.001; %simulated velocity profile
where the function cumtrapz.m computes the cumulative trapezoidal approximation to the integral of the input vector (at), allowing us to convert from acceleration to velocity,
subplot(3,1,2); plot(t,vt,'k--','LineWidth',1.2); %plot of velocity profile
and then again from velocity to position:
pt=cumtrapz(vt)*.001; %simulated position profile
subplot(3,1,3); plot(t,pt,'k-','LineWidth',1.2); %plot of position profile
In the velocity profile we see velocity starts at zero, rises to a single peak at the middle of the movement, and returns to zero at the end of the movement. The position plot describes the change in eye position created by the above velocity profile, and has a characteristic ‘s’ shape.