%% Local Minima in Vector
% Compute and plot the local minima of a vector of data.

x = 1:100;
A = (1-cos(2*pi*0.01*x)).*sin(2*pi*0.15*x);
TF = islocalmin(A);
plot(x,A,x(TF),A(TF),'r*')

% Copyright 2012 The MathWorks, Inc.