Calculates and displays the instantaneous heart rate. This function calculates the instantaneous heart rate. It also computes a confidence interval based on bootstrap statistics. Usage: r = calcHR(s, h, triallen, trls, class, rmartif, alpha, cue, name); Input parameters: s ... Input signal (as obtained by sload) h ... Header structure (as obtained by sload) triallen ... Length of one trial (s) Optional input parameters: trls ... Trials class ... Class rmartif ... Remove artifacts alpha ... Significance level cue ... Location of cue (s) name ... Name of the data set (or subject) Output parameter: r ... Structure containing the results