Hi Noa
That definitely shouldn't happen - and it will be interesting to find out what's causing it.
When you run the Operant protocol (https://github.com/sanworks/Bpod_Gen2/blob/master/Examples/Protocols/Operant/Operant.m) from the Launch manager, having selected the "DefaultSettings" option, your computer loads an empty struct into the BpodSystem object's "ProtocolSettings" field, from from /Documents/Bpod Local/Data/FakeSubject/Operant/Protocol Settings/Default.mat
The Operant protocol (located at /Documents/Bpod Local/Protocols/Operant/) has this block of code near the top:
S = BpodSystem.ProtocolSettings; % Load settings chosen in launch manager into current workspace as a struct called S
if isempty(fieldnames(S)) % If settings file was an empty struct, populate struct with default settings
S.GUI.CurrentBlock = 1; % Training level % 1 = Direct Delivery at both ports 2 = Poke for delivery
S.GUI.RewardAmount = 5; %ul
S.GUI.PortOutRegDelay = 0.5; % How long the mouse must remain out before poking back in
end
So the empty struct you selected from the launch manager (now known in the code as BpodSystem.ProtocolSettings) should be copied into local variable S. If S is empty (which it should be, since the default struct is empty), it is assigned a GUI subfield, containing the paramters you want to have accessible from the ParameterGUI plugin.
The error you're seeing, claims that S does not have a subfield called 'GUI' - which could have happened if:
- S was really not empty, or
2. isempty(fieldnames(S)) evaluated incorrectly (perhaps in the latest MATLAB version?).
So to get to the bottom of it, we'll need some info about your setup:
-Matlab version
-OS
-From the editor, if you put a breakpoint on line 40 of operant.m (nSinglePokeTrials = 5; ), and hover over S, what do you see?
Thanks,
Josh