Home Examples Saving Data at 2 kHz
Advanced

Saving Data at 2 kHz

This task will demonstrate how to save data at 2 kHz in a Kinarm task (which saves data at 1 kHz). The task will generate a 2 kHz signal that counts from 0 and splits the task into 2 signals (the unmodified signal and another signal that is delayed by 1/2 ms). By saving both signals, we sample at 2 kHz.

Also included is a MATLAB script read_2kHz.m that will recombine the two separate signals into the original 2 kHz signal generated in the model.

Last tested in Dexterit-E 3.10 and MATLAB 2015a.

Related Tasks

Coding Tips
Persistent Variables
Persistent variables are ones that hold their value between calls to the embedded MATLAB code they are defined in.
Coding Tips
Custom Control of the Trial Protocol Order
Normally, Dexterit-E manages and controls the order in which Trial Protocols (TPs) execute based on what is defined in the block table of the Task Protocol (see the Dexterit-E User Guide for more details).