Skip to content
Snippets Groups Projects
Commit 1a01b035 authored by Anders Kirk Uhrenholt's avatar Anders Kirk Uhrenholt
Browse files

Corrections in SDK Matlab example.

parent 18ff62e4
No related branches found
No related tags found
No related merge requests found
...@@ -32,15 +32,15 @@ The SDK is responsible for letting users define experiments, upload experiments ...@@ -32,15 +32,15 @@ The SDK is responsible for letting users define experiments, upload experiments
The following example illustrates how to create an experiment with a single trial containing a Likert scale with an attached sound stimulus: The following example illustrates how to create an experiment with a single trial containing a Likert scale with an attached sound stimulus:
```matlab ```matlab
ex = com.MetaComponents.Experiment; % Create top-level experiment
ex.name = 'Cockpit:Test'; ex = cosexperiment('Name', 'Cockpit:Test',...
ex.id = 'a9f56a58-aaaa-eeee-1351-fa4358765432'; 'Id', 'a9f56a58-aaaa-eeee-1351-fa4358765432',...
ex.enablePrevious = true; 'CreatedBy', 'Anders Kirk Uhrenholt');
ex.createdBy = 'Anders Kirk Uhrenholt';
ex.experimentDescription = 'This experiment tests functionalities of the Cockpit SDK.'; % Create first trial
%% TRIAL 1 %%
trial1 = coscreatetrial(ex); trial1 = coscreatetrial(ex);
% Add a header text and a Likert scale component
cosaddheader(trial1, 'HeaderLabel', '{{center|This is the first trial}}'); cosaddheader(trial1, 'HeaderLabel', '{{center|This is the first trial}}');
likertOptions = {... likertOptions = {...
'1{{n}}{{b|sleepy}}{{n}}{{b|tired}}{{n}}{{b|drowsy}}';... '1{{n}}{{b|sleepy}}{{n}}{{b|tired}}{{n}}{{b|drowsy}}';...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment