To find a threshold in a one-dimensional array and plot the same in Matlab: Here is the plot you will get after running the program.

a=[1 2 4 6 8 12 15 -18 25 -35 3 4 8 -3 10 33];
b=abs(a);
c=max(b);
m=min(a);
d=.7*c; k=1;
for i=1:size(a,2)
if b(i)>=d
k=i;
break
end
end
plot(a);
line([k,k],[c,m],’Color’,'r’,'LineStyle’,'-’,'LineWidth’,1);
a=[1 2 4 6 8 12 15 -18 25 -35 3 4 8 -3 10 33]; % one-dimensional array
b=abs(a); % rectifying the data
c=max(b); % finding out the maximum value
m=min(a);
d=.7*c; % finding the threshold value, say 70 percent of the maximum value
k=1;
for i=1:size(a,2) % size of the array
if b(i)>=d
k=i;
break
end
end
plot(a);
line([k,k],[c,m],’Color’,'r’,'LineStyle’,'-’,'LineWidth’,1);