no edit summary
This is an example of a very simple 'experiment' in which letters will appear on the screen one by one to form sentences. In this experiment, adding a new character to a string is called an ''epoch''. A series of epochs that results in a complete sentence is called a ''sequence''. Subjects can press a button when they are ready for the next sentence (sequence). A flowchart of the experiment is shown below:
''Figure 1: Flowchart of the Sentences example experiment''
| BS_INIT || EVENT || bs_send_buffer_marker('init_sequence','eeg',0,'now') ||  || 0 || 
| init_sequence || EVENT || initSequence || put || |
| || | bs_send_buffer_marker('next_sequence','eeg',0,'now') || | ||
| next_sequence || EVENT || nextSequence || get || $self+1, get ||
| start_sequence || button_1 || displayString('') || get || get || 0
| || | bs_send_buffer_marker('next_epoch','eeg',0,'now') || | ||
| next_epoch || EVENT || nextEpoch || get || get || $self+1, get
| proc_epoch || EVENT || displayString() || | ||
| || | bs_send_buffer_marker('next_epoch','eeg',0.25,'now') || | ||
| <strong>end_sequence</strong> || <strong>EVENT</strong> || <strong>bs_send_buffer_marker('next_sequence','eeg',1,'now')</strong> || | ||
=== Creating the Dictionary table ===
.DocsSectionsBuildingExperiments#SecDict Dictionary table] specifies a marker number for each marker that is used in this experiment. The Dictionary table looks like this:
In this experiment, the fourth column ''datasource'' is not absolutely necessary. As only one data source (simulated EEG data, see [
.DocsSectionsExampleSentences#BrainStream .[[DocsSectionsBlockFile]] blocksettings]) is used, BrainStream will automatically apply all marker settings to this data source.
== Testing the experiment ==
The easiest way to create all files that define this experiment is via the [.DocsSectionsBrainStreamEditor BrainStream editor]. You can open the editor by typing <tt>bs_editor</tt> in the Matlab command window (make sure that <tt>brainstream_mds/core</tt> is your current working directory). An experiment file (.exp) has already been created for this example experiment and is located in <tt>/brainstream_mds/examples/blocks/sentences/sentences.exp</tt>. If you open this file in the BrainStream editor, the experiment looks like this:
''Figure 2: The Sentences Experiment in the BrainStream Editor''