Skip to content

Commit

Permalink
Initialize fields to be used by qpUpdate to empty matrix.
Browse files Browse the repository at this point in the history
This allows updating of the initialized structure in place.  Thanks to Josh Solomon for pointing this out.
  • Loading branch information
DavidBrainard committed Aug 2, 2018
1 parent c2c7f75 commit 14d31ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions questplus/qpInitialize.m
Expand Up @@ -69,6 +69,7 @@

% 07/04/17 dhb Sped up using profiler.
% 07/22/17 dhb More flexible stimulus and parameter filtering.
% 08/02/18 dhb Initialize fields used by qpUpdate as th empty matrix.

%% Start with the parameters
%
Expand Down Expand Up @@ -160,4 +161,12 @@
questData.expectedNextEntropiesByStim = [];
end

%% Set up fields that will be filled in later
%
% This prevends errors if you try to update the structure in place
% and add those fields.
questData.trialData = [];
questData.stimIndices = [];
questData.entropyAfterTrial = [];

end

0 comments on commit 14d31ab

Please sign in to comment.