findpeaks accepts only vector data as it's input arguments. A possible workaround would be to use a Buffer block in between Simulink output and MATLAB Function input
Example:
The above example locates the peaks of a discrete sine wave. The Sine Wave block returns a scalar value while findpeaks expects a vector input. To fix this discrepancy, A buffer can be used to convert scalar value to vector values