Main Content

sbiosaveproject

Save all models in root object

Syntax

sbiosaveproject projFilename
sbiosaveproject projFilename variableName
sbiosaveproject projFilename variableName1 variableName2 ...

Description

sbiosaveproject projFilename saves all models in the SimBiology® root object to the binary SimBiology project file named projFilename.sbproj. The project can be loaded with sbioloadproject. sbiosaveproject returns an error if projFilename.sbproj is not writable.

sbiosaveproject creates the binary SimBiology project file named simbiology.sbproj. sbiosaveproject returns an error if this is not writable.

sbiosaveproject projFilename variableName saves only variableName. variableName can be a SimBiology model or any MATLAB® variable.

sbiosaveproject projFilename variableName1 variableName2 ... saves the specified variables in the project.

Use the functional form of sbiosaveproject when the file name or variable names are stored in a character vector. For example, if the file name is stored in the variable fileName and you want to store MATLAB variables variableName1 and variableName2, type sbiosaveproject (projFileName, 'variableName1', 'variableName2') at the command line.

Examples

collapse all

Import a model from an SBML file.

modelObj = sbmlimport ('oscillator.xml');

Check if there are other models at the root.

rootObj = sbioroot
rootObj = 
   SimBiology Root Contains:

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

Save all models present at the root to a SimBiology project file named allSimBioModels.sbproj.

sbiosaveproject allSimBioModels

Version History

Introduced in R2006a