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: computewidth.m
    path of file: ./repos/PeakFit/@PeakFit
    
    the code of the file until where you have to start completion: function width = computewidth(peakShape, area, height)
    %% Compute Peak Width
    %  width = PeakFit.computewidth(peakShape, area, height) computes the width
    %  of a peak function of the specified peakShape, given its area and
    %  height.
    %
    % Copyright: Herianto Lim (https://heriantolim.com)
    % Licensing: GNU General Public License v3.0
    % First created: 25/03/2013
    % Last modified: 25/03/2013

    assert(isintegerscalar(peakShape), ...
        'PeakFit:computewidth:InvalidInput', ...
        'Input to the peak shape must be an integer scalar.');
    assert(isrealarray(area) && isrealarray(height), ...
        'PeakFit:computewidth:InvalidInput', ...
        'Input to the area and height must be arrays of real numbers.');
    assert(all(size(area) == size(height)), ...
        'PeakFit:computewidth:InvalidInput', ...

    
function width = computewidth(peakShape, area, height)
    %% Compute Peak Width
    %  width = PeakFit.computewidth(peakShape, area, height) computes the width
    %  of a peak function of the specified peakShape, given its area and
    %  height.
    %
    % Copyright: Herianto Lim (https://heriantolim.com)
    % Licensing: GNU General Public License v3.0
    % First created: 25/03/2013
    % Last modified: 25/03/2013

    assert(isintegerscalar(peakShape), ...
        'PeakFit:computewidth:InvalidInput', ...
        'Input to the peak shape must be an integer scalar.');
    assert(isrealarray(area) && isrealarray(height), ...
        'PeakFit:computewidth:InvalidInput', ...
        'Input to the area and height must be arrays of real numbers.');
    assert(all(size(area) == size(height)), ...
        'PeakFit:computewidth:InvalidInput', ...
        'The area and height arrays must have the same dimensions.');

    switch peakShape
        case 1
            width = 2 / pi * area ./ height;
        case 2
            width = 2 / sqrt(pi / log(2)) * area ./ height;
        otherwise
            error('PeakFit:computewidth:UnexpectedInput', ...
                'The specified peak shape is not recognized.');
    end