Skip to main content
. 2020 Jun 12;7:100959. doi: 10.1016/j.mex.2020.100959

Algorithm 2 Algorithm for individual scaling of heart rate values.

Data: P:= number of participants
T:= number of time points (length of exercise)
SHR(p,t):= matrix of heart rate for all participants
[[S1,1, …, S1,t, …,S1,T]
[Sp,1, …, Sp,t, …,Sp,T]
[SP,1, …, SP,t, …,SP,T]]
HRMAX(p):= list of maximum heart rates for participants
[HRMAX(1), …, HRMAX(p), …, HRMAX(P)]
Result: SScaledHR(p,t):= matrix of scaled heart rate for all participants
[[S1,1, …, S1,t, …,S1,T]
[Sp,1, …, Sp,t, …,Sp,T]
[SP,1, …, SP,t, …,SP,T]]
1 for participant in range(1..P) do
2  low:= HRMAX(p)/2;
3  high:= HRMAX(p);
4  for t in range(1..T) do
5   SScaledHR(participant, t):= (SHR(participant, t) - low) / (high - low);
6   if SScaledHR(participant, t) ≥ high then SScaledHR(participant, t):= high;
7   if SScaledHR(participant, t) ≤ min then SScaledHR(participant, t):= min;
8  end
9 end