Integrating "Identification" into MonkeyLogic Setup April 23, 2024 02:22PM |
Registered: 6 months ago Posts: 2 |
Re: Integrating "Identification" into MonkeyLogic Setup April 23, 2024 06:17PM |
Admin Registered: 5 years ago Posts: 922 |
Re: Integrating "Identification" into MonkeyLogic Setup May 14, 2024 01:13PM |
Registered: 6 months ago Posts: 2 |
function [C,timingfile,userdefined_trialholder] = task_userloop(MLConfig,TrialRecord) C = []; timingfile = {'ID1.m','ID2.m','ID3.m'}; userdefined_trialholder = ''; % I save the ID of the first Monkey using the device, to check for the changes in the upcoming trials. persistent timing_filename_returned if isempty(timing_filename_returned) timing_filename_returned = true; TrialRecord.User.CurrentMonkey = TrialRecord.User.monkeyID; return end if TrialRecord.User.CurrentMonkey ~= TrialRecord.User.monkeyID switch TrialRecord.User.monkeyID case 1 timingfile = 'ID1.m'; TrialRecord.User.CurrentMonkey = TrialRecord.User.monkeyID; TrialRecord.Quit = true; case 2 timingfile = 'ID2.m'; TrialRecord.User.CurrentMonkey = TrialRecord.User.monkeyID; case 3 timingfile = 'ID3.m'; TrialRecord.User.CurrentMonkey = TrialRecord.User.monkeyID; end end end
Re: Integrating "Identification" into MonkeyLogic Setup May 14, 2024 02:28PM |
Admin Registered: 5 years ago Posts: 922 |
function [C,timingfile,userdefined_trialholder] = task_userloop(MLConfig,TrialRecord) C = []; timingfile = {'ID1.m','ID2.m','ID3.m'}; userdefined_trialholder = ''; persistent timing_filename_returned if isempty(timing_filename_returned) timing_filename_returned = true;TrialRecord.User.CurrentMonkey = TrialRecord.User.monkeyID;return end % run a command or call a function to get the RFID from the reader ID = readRFID(); % this is an example switch ID case 1, timingfile = 'ID01.m'; case 2, timingfile = 'ID02.m'; case 3, timingfile = 'ID03.m'; 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.