Main Content

sbioreset

Delete all model objects

Syntax

sbioreset

Description

sbioreset deletes all SimBiology® model objects at the root level. You cannot use a SimBiology model object after it is deleted.

Tip

To remove a SimBiology model object from the MATLAB® workspace, without deleting it from the root level, use the clear function.

Note

If the SimBiology desktop is open, calling sbioreset at the command line deletes all model objects that are open in the desktop.

The SimBiology root object contains a list of SimBiology model objects, available units, unit prefixes, and kinetic law objects. A SimBiology model object has its Parent property set to the SimBiology root object.

To add a kinetic law definition to the SimBiology root user-defined library, use the sbioaddtolibrary function. To add a unit to the SimBiology user-defined library on the root, use sbiounit followed by sbioaddtolibrary. To add a unit prefix to the SimBiology user-defined library on the root, use sbiounitprefix followed by sbioaddtolibrary.

Examples

collapse all

This example shows how to delete all SimBiology objects at the root level.

Import a model into the workspace.

modelObj = sbmlimport('oscillator');

Note that the workspace contains modelObj and if you query the SimBiology® root, there is one model on the root object.

rootObj = sbioroot
rootObj = 
   SimBiology Root Contains:

    Models:                           1
    Builtin Abstract Kinetic Laws:    11
    User Abstract Kinetic Laws:       0
    Builtin Units:                    53
    User Units:                       0
    Builtin Unit Prefixes:            13
    User Unit Prefixes:               1

Use clear all to clear the workspace. The modelObj still exists on the rootObj.

clear all
rootObj = sbioroot
rootObj = 
   SimBiology Root Contains:

    Models:                           1
    Builtin Abstract Kinetic Laws:    11
    User Abstract Kinetic Laws:       0
    Builtin Units:                    53
    User Units:                       0
    Builtin Unit Prefixes:            13
    User Unit Prefixes:               1

Use sbioreset to delete the modelObj from the root.

sbioreset
rootObj
rootObj = 
   SimBiology Root Contains:

    Models:                           0
    Builtin Abstract Kinetic Laws:    11
    User Abstract Kinetic Laws:       0
    Builtin Units:                    53
    User Units:                       0
    Builtin Unit Prefixes:            13
    User Unit Prefixes:               1

Version History

Introduced before R2006a