Sorry for the confusion, I earlier meant the latter one you suggested. Thanks for the clarification. I have tried to use the GraphicProperty adapter for creating image rotation to randomized degrees in 2000ms. This is the code I currently have:
sample_img = ImageGraphic(null_);
sample_img.List = {image_stim,[0 0]};
sample_angle = get_angle();
sample_img.Scale = [sample_scale,sample_scale];
sample_img.Angle = sample_angle;
rotated_img = GraphicProperty(null_);
rotated_img.Target = sample_img;
rot_angles = linspace(0,sample_angle,n_steps);
rotated_img.Property = 'angle';
rotated_img.Value = {rot_angles};
rotated_img.DurationUnit = 'msec';
snd = rotation_and_sound(sample_angle,hold_time);
con = Concurrent(rotated_img);
con.add(snd); %% display auditory cues in parallel
tc = TimeCounter(con);
tc.Duration = hold_time;
% run the scene
scene = create_scene(tc);
run_scene(scene,30);
idle(500); % clear screen
end
However, when I tried to run this file, there is an error suggesting:
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Error in GraphicProperty/analyze (line 170)
obj.bValChanged=obj.PrevValIdx~=ValIdx&&repetition(2)<obj.Repetition;
^^^^^^^^^^^^^^
Error in Concurrent/analyze (line 7)
continue_=obj.Adapter{1}.analyze(p);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mladapter/analyze (line 35)
continue_=obj.Adapter.analyze(p);
^^^^^^^^^^^^^^^^^^^^^^
Error in TimeCounter/analyze (line 17)
analyze@mladapter(obj,p);
^^^^^^^^^^^^^^^^^^^^^^^^
Error in rotation_runtime/run_scene (line 155)
continue_=scene.Adapter.analyze(param_);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in rotation_runtime (line 1329)
run_scene(scene,30);
^^^^^^^^^^^^^^^^^^^
Error in run_trial (line 129)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in monkeylogic/UIcallback (line 894)
result = run_trial(MLConfig,datafile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have also uploaded the full script for convenience. It would be ideal if you could please help me to clarify the issue and if there is a way that I can refine my code. Thank you so much for the help!