Using the gamma-correction CLUT in your experiments
If you wish to apply the gamma correction CLUT in your experiments, you can simply add a copy of inverseGamma.mat to your local folder, and execute these lines of code:
%% Insert these lines after opening your stimulus window
load inverseCLUT; %Load the results of GenerateInverseClutFromGamma.m
originalCLUT = Screen('LoadNormalizedGammaTable',window,inverseCLUT);
%%%%%%
%% YOUR EXPERIMENT GOES HERE
%%%%%%
%% Insert this line before closing your stimulus window
Screen('LoadNormalizedGammaTable',window,repmat(linspace(0,1, 256)',1,3));