TaskObject June 14, 2019 01:23PM |
Admin Registered: 5 years ago Posts: 858 |
TaskObject(3).Zorder = 1; % Change the z-order of TaskObject#3 TaskObject.Zorder(3) = 1; % The same as above line box = BoxGraphic(null_); box.Zorder = 1; % All graphic adapters have the Zorder property now. box.Zorder(2) = 1; % In case there are multiple objects in one adapter.
Condition Frequency Block Timing File TaskObject#1 TaskObject#2 1 1 1 3 dms fix(0,0) pic(A,0,0)
function [C,timingfile,userdefined_trialholder] = dms_userloop(MLConfig,TrialRecord) ... C = { 'fix(0,0)', 'pic(A,0,0)' }; % fix is TaskObject#1 and pic, TaskObject#2. ... end
function [C,timingfile,userdefined_trialholder] = dms_userloop(MLConfig,TrialRecord) ... switch cond case 1, C = { 'fix(0,0)', 'pic(A,0,0)' }; % fix appears above pic case 2, C = { 'pic(A,0,0)', 'fix(0,0)' }; % pic appears above fix end ... end
function [C,timingfile,userdefined_trialholder] = dms_userloop(MLConfig,TrialRecord) ... % In the code below, TaskObjects are created and stored in a persistent variable so that they % may not be recreated every trial. It shortens the stimulus preparation time during ITI. persistent TaskObject if isempty(TaskObject) TaskObject = mltaskobject({ 'pic(A,0,0)', 'fix(0,0)' }, MLConfig, TrialRecord); end % By reversing the order of 'pic' and 'fix' as below, you can make 'fix' to be TaskObject#1 % in the timing file, but the z-orders of the stimuli are already determined when they are % created so it doesn't make 'fix' appear above 'pic'. C = TaskObject([2 1]); ... end
The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.