% 
% Copyright (c) 2006-2012 by University of Washington.  All rights reserved. Confidential
%
function [stalled_i] = find_stalled(speed,pitch,min_stall_speed,max_stall_speed,min_stall_angle)
  stalled_i = find(isnan(speed) | ...
                   imag(speed) | ...
                   speed >= max_stall_speed & ...
                   abs(pitch) < min_stall_angle | ...
                   speed <= min_stall_speed);
  