Main Content

isAccelerated

Determine whether an exported SimBiology model is accelerated

Description

example

tf = isAccelerated(model) returns true if model is accelerated for the current type of computer, and false otherwise.

tf = isAccelerated(model,computerType) returns true if model is accelerated for the specified computer type.

Examples

collapse all

Load a sample SimBiology® model object, and export.

modelObj = sbmlimport('lotka');
em = export(modelObj)
em = 
  Model with properties:

           Name: 'lotka'
     ExportTime: '13-Feb-2024 00:48:28'
    ExportNotes: ''

Accelerate the exported model.

accelerate(em);
em.isAccelerated
ans = logical
   1

The logical value 1 indicates that the exported model is accelerated.

Input Arguments

collapse all

Input model, specified as a SimBiology.export.Model object or array of such objects.

Computer type, specified as a character vector or string scalar. You can specify any valid system architecture supported by the function computer.

Output Arguments

collapse all

Output indicating if model is accelerated, returned as a scalar logical value or array of logical values. tf is true if model is accelerated for the current computer type, or computer type specified by computerType. tf is false if the exported model is not accelerated for the specified computer type.

If the input is an array of objects, the output tf is a logical array that is the same size as the input array.

Version History

Introduced in R2012b