# MATLAB: Need to generate a signal as attached.

random number generatorsignalsignal processingSignal Processing Toolbox

Hi all,
I will get my input samples as shown in attached figure.
So to check with that, i need to generate the samples as shown in attached figure.
It has samples with unequal spacing and unequal amplitudes.
I need to generate a signal like the attached figure.
Could anyone plz help me out in generating the signal as shown in attached figure.

x = 0:399;xp = sort(randi(400, 1, 19));y = zeros(1,400);y(xp) = rand(1, 19)*3;figure(1)plot(x, y, '-r')text(xp,y(xp), cellstr(strsplit(num2str(1:19,'%d '),' ')))  % Add Numbers To The Peaks