Calculates the instantaneous heart rate. This function calculates the instantaneous heart rate. It is also possible to mark the occurrences of cues by vertical lines. Usage: hr = plotHR(s, h, startend); Input parameters: s ... Input signal (as obtained by sload) h ... Header structure (as obtained by sload) Optional input parameters: startend ... Start and end of the signal to be plotted (s) Output parameter: r ... Structure containing the results