MATLAB: Plot inverse of ECG signal

ecgekgelectrocardiogramheart rateheart rate variabilityimage analysissignal processing

I have a 1×4000 vector of ECG data. The data seems to be plotted upside down with the R wave facing downwards. I would like to invert the plot/data for peak detection analysis but seem to be having trouble. When I use the flipud/inv/pinv commands I get no change in the data plots. What can I try next?
Thanks

Best Answer

That could be normal, depending on the lead, for example in aV_R or V_1.
If you want to invert it, the easiest way is simply to negate it, multiplying it by -1.