Main Content

modelfinder.setSearchDatabase

Set search scope to find models

Since R2023b

    Description

    example

    modelfinder.setSearchDatabase displays a list of the databases registered with the Model Finder and prompts you to select the search databases. The search databases define the search scope for Model Finder to find models, examples, and projects based on your search query. For more information on searching databases, see modelfinder.

    example

    modelfinder.setSearchDatabase(dbPaths) sets one or more database paths as the search databases for the Model Finder.

    Examples

    collapse all

    Select databases you want to search using the Model Finder.

    modelfinder.setSearchDatabase

    The Command Window displays a list of databases registered with the Model Finder. The current search databases are marked [active].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 select search databases, enter the corresponding numbers as comma-separated values.

    Enter the database numbers you want to search as comma-separated values or 'q' to quit.
    1. Analog
    2. Continuous 
    3. Digital
    4. Discrete
    5. modelfinder [active]
    Selection:

    After setting the search databases, you can search for models, examples, and projects using the modelfinder function.

    Set registered databases digital_systems.db and analog_systems.db located in specified paths as the search databases to find models.

    modelfinder.setSearchDatabase(["communication/databases/digital_systems.db",...
    "communication/databases/analog_systems.db"])

    After setting the search databases, you can search for models, examples, and projects using the modelfinder function.

    Input Arguments

    collapse all

    Absolute or relative paths to the database files to be set as the search databases to find models, examples, and projects, specified as a string or character vector for a single database, or a string array or cell array of character vectors for multiple databases.

    Example: "communication/databases/digital_systems.db"

    Example: ["analog_systems.db","digital_systems.db"]

    Data Types: string | char | cell

    Alternatives

    You can select search databases using the Model Finder user interface. For more information, see Configure and Search Databases.

    Version History

    Introduced in R2023b