The FFT function is not suited for measuring the BPM signal as Klaus mentioned, unless your focus of interest was another, such as analyzing the scattering pattern of the beat hart along the time ( whatever the health meaning of that ), but in this case you should take a big data stream.
By the way, if you are measuring a signal with a rate of around 1 Hz, the full scale of ~550Hz at above graph is compressing any information, making it impossible to know if the code is working or not. MATLAB has functions that allow you define customized range for plotting.