Hello Noa
First you should interface your RFID reader with MATLAB. Which model are you using?
Once you have the ability to poll for reads from the MATLAB command line, you would create a loop. In pseudocode,
while(1)
If NewReadAvailable
MouseID = ReadRFID
RunMyProtocol(MouseID)
end
end
where RunMyProtocol is a custom function to set up and run the correct protocol from the command line with the correct settings.
At the moment, protocols are easy to initialize from the launch manager, but the command line launch tool is broken and needs to be updated, to be compatible with the latest improvements. Until it is ready, a protocol that isn't initialized from the launch manager will have to be set up in your code. To see how this is done, in the beta repository branch, see the LaunchProtocol function in /Bpod/Functions/Launch Manager/LaunchManager.m
Hopefully we'll have the single-command launch function fixed and standardized in the near future.
Josh