/usr/share/psychtoolbox-3/Quest/QuestP.m is in psychtoolbox-3-common 3.0.11.20131230.dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | function p=QuestP(q,x)
% p=QuestP(q,x)
%
% The probability of a correct (or yes) response at intensity x, assuming
% threshold is at x=0.
%
% See Quest.
% 7/25/04 awi cosmetic (help text layout).
% Copyright (c) 1996-2004 Denis Pelli
if x<q.x2(1)
p=q.p2(1)
elseif x>q.x2(end)
p=q.p2(end)
else
p=interp1(q.x2,q.p2,x);
end
if ~isfinite(p)
q
error(sprintf('psychometric function %g at %.2g',p,x))
end
|