You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: extract_max_activity.m
    path of file: ./repos/CaImAn-MATLAB/utilities
    
    the code of the file until where you have to start completion: function [LOCS,Ym] = extract_max_activity(Y,nlocs,width)

    
function [LOCS,Ym] = extract_max_activity(Y,nlocs,width)

% extract points of maximum activation for each pixel using the findpeaks
% function. Requires the signal processing toolbox and uses the parallel
% processing toolbox if present

% INPUTS:
% Y:        input data
% nlocs:    number of local maxima for each location
% width:    length of each interval

% OUTPUTS:
% LOCS:     max activation intervals
% Ym:       max activation values

% Written by:
% Eftychios A. Pnevmatikakis, Simons Foundation, 2016

warning('off', 'MATLAB:maxNumCompThreads:Deprecated');

if nargin < 3 || isempty(width)
    width = 21;
end