Main Content

modelfinder.setDefaultDatabase

Set default database to index models

Since R2023b

    Description

    example

    modelfinder.setDefaultDatabase displays a list of the databases registered with the Model Finder and prompts you to select a default database to index models. For more information on indexing models, see modelfinder.registerFolder.

    example

    modelfinder.setDefaultDatabase(dbPath) sets the database specified by path dbPath as the default database to index models.

    example

    modelfinder.setDefaultDatabase(dbPath,alias) sets the database specified by path dbPath as the default database to index models and assigns an alias specified by alias.

    Examples

    collapse all

    Set a default database to index models with the Model Finder.

    modelfinder.setDefaultDatabase

    The Command Window displays a list of databases registered with the Model Finder. The current default database is marked [default]. The list uses the database aliases. If an alias is not set when you register or create a database, the list uses the database name. To set a different database as the default, enter the corresponding database number.

    Enter the database number you want to select (choose number) or 'q' to quit.
    1. Analog
    2. Continuous 
    3. Digital
    4. Discrete
    5. modelfinder [default]
    Selection:

    You can use the default database to index models using the modelfinder.registerFolder function.

    Set a registered database digital_systems.db as the default database to index models with the Model Finder.

    modelfinder.setDefaultDatabase("communication/database/digital_systems.db")

    You can use the default database to index models using the modelfinder.registerFolder function.

    Set a registered database digital_systems.db as the default database to index models with the Model Finder and assign an alias Digital.

    modelfinder.setDefaultDatabase("communication/database/digital_systems.db","Digital")

    You can use the default database to index models using the modelfinder.registerFolder function.

    Input Arguments

    collapse all

    Absolute or relative path to the database file to be set as the default database to index models, specified as a string or character vector.

    Example: "communication/databases/digital_systems.db"

    Data Types: string | char

    Alternate name of the database, specified as a string or character vector. If an alias is not set, the database file name is used as the alias.

    Example: "Digital"

    Data Types: string | char

    Version History

    Introduced in R2023b