/usr/share/psychtoolbox-3/Quest/QuestPdf.m is in psychtoolbox-3-common 3.0.11.20140816.dfsg1-1.
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 24 25 26 27 28 | function p=QuestPdf(q,t)
% p=QuestPdf(q,t)
%
% The (possibly unnormalized) probability density of candidate threshold "t".
% q and t may be vectors of the same size, in which case the returned p is a vector of that size.
%
% See Quest.
% Denis Pelli
% 5/6/99 dgp wrote it
% Copyright (c) 1996-1999 Denis Pelli
if nargin~=2
error('Usage: p=QuestPdf(q,t)')
end
if size(q)~=size(t)
error('both arguments must have the same dimensions')
end
if length(q)>1
p=zeros(size(q));
for i=1:length(q(:))
p(i)=QuestPdf(q(i),t(i));
end
return
end
i=round((t-q.tGuess)/q.grain)+1+q.dim/2;
i=min(length(q.pdf),max(1,i));
p=q.pdf(i);
|