function msg = getMessage(catalogName, id, varargin)
    % This function returns the catalog entry of message ids
    %
    % INPUTS:
    %   catalogName (1, 1) string - Name of a pde catalog
    %   id (1, :) string - Message id in catalog
    %   varargin(1, 1) cell - Any extra inputs for holes in the message
    %
    % OUTPUTS:
    %   msg (1, :) string - Corresponding catalog messages

    % Copyright 2022 The MathWorks, Inc.

    % Cast catalogName and id to string
    id = string(id);
    catalogName = string(catalogName);

    % Return corresponding catalog message for each id
    msg = strings(size(id));
    for ct = 1:numel(id)
        msg(ct) = string(message("pde:" + catalogName + ":" + id(ct), ...
            varargin{:}));
    end
end
