Model and Library Automatic Conversion Examples

About the Automatic Conversion Examples

These conversion examples use two example models and one example library from first generation. Models and libraries do not have to be open before you start converting them.

  • drive_sgear — Standalone example model

  • drive_efficiency — Examples library, similar to a user-defined library

  • drive_sgear_lossy — Example model linked to drive_efficiency

    Tip   Proceed through the following examples in the order presented for complete coverage on how to use sdl_update.

Convert Example Model

At the command line, enter:

v2mdlname1 = sdl_update('drive_sgear');

The second-generation model is generated in the current folder, and its name is stored as the character vector v2mdlname1.

Convert Example Library

At the command line, enter:

v2libname = sdl_update('drive_efficiency');

The second-generation library is generated in the current folder, and its name is stored in the character vector v2libname.

Convert Example Model Linked to Example Library

    Note:   Complete the preceding example before attempting this one.

At the command line, enter:

v2mdlname2 = sdl_update('drive_sgear_lossy','drive_efficiency',

This form of the function specifies the first-generation library name as a sequence of characters in single quotation marks, but the new library name as a character vector. It uses the same character vector as in the preceding example.

Was this topic helpful?