Main Content

modelfinder.registerFolder

Index models in Model Finder

Since R2022a

    Description

    example

    modelfinder.registerFolder(pathsToFolders) indexes all models located in one or more folder paths specified by pathsToFolders in the default database of Model Finder. For more information on the Model Finder default database, see modelfinder.setDefaultDatabase.

    When you index models in a database, the database stores the textual information of the models such as model names, example names, model paths, description, annotation, block names, and block types. To easily access the models, you can set a search query in the database. Model Finder matches your search query with the textual information in the database and displays the search results. For more information on searching databases, see modelfinder.

    example

    modelfinder.registerFolder(pathsToFolders,dbPath) indexes all models located in one or more folder paths specified by pathsToFolders in the database at the path dbPath. If the database does not exist at dbPath, a new database file is created in the specified path.

    Examples

    collapse all

    Index all models from folders wireless and optical in the default database of Model Finder.

    modelfinder.registerFolder(["/users/data/wireless","/users/data/optical"])

    You can search the indexed models using the modelfinder function.

    Index all models from folders wireless and optical in the database digital_systems.db.

    modelfinder.registerFolder(["/users/data/wireless","/users/data/optical"],...
    "communication/databases/digital_systems.db")

    You can search the indexed models using the modelfinder function.

    Input Arguments

    collapse all

    Absolute or relative paths to folders to be registered with Model Finder, specified as a string scalar or character vector for a single folder, or a string array or cell array of character vectors for multiple folders.

    Example: "/users/data/wireless"

    Example: ["/users/data/wireless","/users/data/optical"]

    Data Types: string | char | cell

    Absolute or relative path to the database file to index models from the specified folders, specified as a string scalar or character vector. If the database file does not exist, a new database file is created in the specified path.

    Example: "/communication/databases/digital_systems.db"

    Data Types: string | char

    Version History

    Introduced in R2022a

    expand all