Here is the file. Definitely leaves room for improvement. No H1 line, bare-bones help and no example. The use of the return variable is poor. The syntax should follow max() i.e.
maxima = zipeaks(y);
[maxima,ind] = zipeaks(y);
function peak=zipeaks(y)
%Usage: peak=zipeaks(y);
%Returns 2x(number of maxima) array
%peak(1,:) = value at maximum
%peakloc(2,:) = index value for maximum
%Find locations of local maxima
%yD=1 at maxima, yD=0 otherwise, end point maxima excluded
N=length(y)-2;
yD=[0 (sign(sign(y(2:N+1)-y(3:N+2))-sign(y(1:N)-y(2:N+1))-.1)+1) 0];
%Indices of maxima and corresponding values of y
Y=logical(yD);
I=1:length(Y);
peak(1,:)=I(Y);
peak(2,:)=y(Y);