function [ ais_length ] = batch_ais_auto(files,threshold)
%BATCH_FIND_AIS Enables batch processing using the function
%find_ais_auto


emptyCells = cellfun(@isempty,files);                    %finds empty cells from the "files" input
files(emptyCells) = [];                                  %deletes empty cells

L=length(files);

for nn=1:L
    ais_length(nn)=ais_auto(files{nn},threshold,'gaussian');     %Calls the function find_ais_impro3 multiple times and writes away the output(scalar) in ais_length.
end


out=[];

for mm=1:L;
O=num2str(ais_length(mm));
O(:,end+1)=char(10);
out=[out,O];
end

clipboard('copy',out);


end

