Main Content

prodserver.addon.isAddOnFcn

Determine if function is installed as part of MATLAB Production Server add-on

Since R2020b

    Description

    example

    tf = prodserver.addon.isAddOnFcn(fcn) returns logical 1 (true) if the function fcn is present on the MATLAB® path and originates in a folder that belongs to a MATLAB Production Server™ add-on. Otherwise, the function returns logical 0 (false). The function returns false if the add-on containing fcn is disabled or not installed, because disabling an add-on removes its functions from the MATLAB path.

    This function requires MATLAB Client for MATLAB Production Server.

    example

    [tf,name] = prodserver.addon.isAddOnFcn(fcn) additionally returns the name of the add-on that contains the function fcn. If the add-on containing fcn is disabled or not installed, the function returns an empty string.

    Examples

    collapse all

    Check if the function mandelbrot is installed on the client machine as part of an add-on.

    tf = prodserver.addon.isAddonFcn('mandelbrot')
    tf =
    
      logical
    
       0
    

    The output indicates that the function mandelbrot is not installed as a part of any add-on on the client machine.

    Find which add-on contains a particular function.

    Consider a deployable archive fractal that you host on the server instance. For more information on how to create and deploy an archive, see Create Deployable Archive for MATLAB Production Server and Deploy Archive to MATLAB Production Server.

    After you install the fractal add-on from the server instance, check if the function mandelbrot is present in the add-on.

    [tf,name] = prodserver.addon.isAddonFcn('mandelbrot')
    tf =
    
      logical
    
       1
    
    name = 
    
        "fractal"

    The output indicates that the function mandelbrot is installed on the client machine as part of the fractal add-on.

    Input Arguments

    collapse all

    Name of the function, specified as a character vector or string scalar.

    Example: 'mandelbrot'

    Data Types: char | string

    Output Arguments

    collapse all

    Value that indicates if the function is installed as part of an add-on, specified as a character vector or string scalar.

    Name of the add-on that contains the function, specified as a character vector or string scalar. If the add-on containing the function is disabled or not installed, the function returns an empty string.

    Version History

    Introduced in R2020b