Hi there
Every time I use findpeaks it returns a vector that is much smaller than the starting vector (that contains the peaks). I want to find the peaks in a vector that is 10033×1, but then plot those peaks against another vector (also 10033×1) whilst maintaining the scale. I have tried multiple things to return a vector of the same size, but nothing seems to work. Here the most recent example of what I have tried:
x = linspace(0, max(AhAh), :);%Finding Charge Capacity
[Cpks, locs] = findpeaks(AhAh, x);%Finding Discharge Capacity
[Dpks, locs] = findpeaks(-AhAh, x);
– AhAh is 10033×1
– UV is 10033×1
– I want to plot the peaks of AhAh against UV
Any help would be greatly appreciated!
Many thanks
Rob
Best Answer