I have the following data:
Experimental data and ideal fitting function
I have been trying to fit it with a sequence of square pulses which I define as: