[bp, bs, bf, bv, cp, wgd, wd] = ... heartbeats(data, struct('cleanup', true, 'plot', true));