Adaptive Track Engine

버전 1.4.0.0 (5.54 KB) 작성자: W. Owen Brimijoin
Determines what changes you should make to the signal during a psychoacoustic adaptive track.
다운로드 수: 654
업데이트 날짜: 2013/6/26

라이선스 보기

Trying to measure a psychoacoustic threshold and can't wrap your head around how to do a 3 down 1 up staircase? This function handles the decisions about whether (and by how much) to increment or decrement your signal on the next trial. The rules (e.g., 3 down, 1 up) are an input variable, allowing you to use any arbitrary rule scheme for your adaptive track.

You provide the function with all the subject’s answers up to that point (correct and incorrect), step sizes, number of reversals you want, and the adaptive rules. The function then outputs the change to apply to the signal (if any) and the reversal indices once the adaptive track is finished.

>> [change,reversals] = adaptive_track_engine(answers,steps,reversals,rules)

Based on an adaptive track with steps of 6 dB initial and 2 dB final, 3 reversals for the first stage, 5 for the second, and a 3 down 1 up method, given the listener's answer history so far:
>> answers = [0 1 1 1 1 1 1 1 1 1];
>> [change, reversals] = adaptive_track_engine(answers,[6 2],[3 5],[3 1])
change = -6
reversals = []

'change' will tell you if and by how much you need to change your signal on the next trial.
‘reversals’ will be empty until total reversals are exceeded, at which stage it will contain a logical index of the points in the track when reversals occurred.

Later on in the adaptive track:
>> answers = [0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0];
>> [change, reversals’] = adaptive_track_engine(answers,[6 2],[3 5],[3 1])
change = 2
reversals = []

With this function, the code required to implement an entire adaptive track is simple:

[answers, reversals] = deal([]); %clear out the reversals and answers
levels = 50; %this is the starting level
while isempty(reversals),
play_signal(sum(levels)); %play your stimulus at sum(levels) level
answers = [answers;get_answer()]; %get your subject response
[levels(end+1),reversals] = adaptive_track_engine(answers,[6 2],[3 4],[3 1]);
end
levels = cumsum(levels); %this is the vector of levels that were used

Optional use of 'method': The function will assume that your 'steps' variable is in decibels and will return positive or negative decibels. Alternatively, you can call the method as 'scalar':
>> [change,reversals] = ADAPTIVE_TRACK_ENGINE(answers,[1.414 1.225],[3 5],[3 1],'scalar')

in which case the code will return 1.414 for increments or its inverse 0.707 for decrements during the first stage, 1.225 or 0.817 and so on.

This submission includes an example
(interleaved_adaptive_track_example.m), showing how to use the core 'adaptive_track_engine' to run a set of interleaved adaptive tracks.

인용 양식

W. Owen Brimijoin (2024). Adaptive Track Engine (https://www.mathworks.com/matlabcentral/fileexchange/40892-adaptive-track-engine), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Engines & Motors에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

Added an example showing how to use the function to run a set of interleaved adaptive tracks and estimate a participant's threshold.

1.3.0.0

Added the optional method of outputting a scalar value (or its inverse) instead of only dB. This increases the flexibility of code for use with different types of adaptive tracks and staircase threshold estimating experiments.

1.2.0.0

Now upon finishing, the code fills the previously empty 'reversals' output argument with an index of the time points in the track where reversals occurred.

1.1.0.0

Improved comments and input checking

1.0.0.0