Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

time

Access global simulation time

Syntax

time

Description

You can access global simulation time from the equation section of a Simscape™ file using the time function.

time returns the simulation time in seconds.

Examples

The following example illustrates y = sint):

component
  parameters
    w = { 1, ‘1/s' } % omega
  end
  outputs
    y = 0;
  end
  equations
    y == sin( w * time );
  end
end

See Also

equations

Introduced in R2008b

Was this topic helpful?