Calculates and displays the instantaneous heart rate. This function calculates and displays the instantaneous heart rate relative to a reference interval. It also computes a confidence interval based on bootstrap statistics. Usage: [hr, cl, cu] = plotHRd(s, h, triallen, trls, class, rmartif, ref, 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 ref ... Reference interval (in s) alpha ... Significance level cue ... Location of cue (s) name ... Name of the data set (or subject) Output parameter: r ... Structure containing the results