Skip to content

Commit e4e0f64

Browse files
sturmkbeutlich
authored andcommitted
Updated documentation on the sample()-operator to include its use for clocked discrete-time conversion
1 parent be949b2 commit e4e0f64

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ModelicaReference/package.mo

+7-3
Original file line numberDiff line numberDiff line change
@@ -4669,13 +4669,17 @@ the return value changes discontinuously.]</em></p>
46694669
extends ModelicaReference.Icons.Information;
46704670
annotation (Documentation(info="<html>
46714671
<p>
4672-
Trigger time events
4672+
Trigger time events, or convert variables to clocked discrete-time domain
46734673
</p>
46744674
<h4>Syntax</h4>
46754675
<blockquote><pre><strong>sample</strong>(start, interval)</pre></blockquote>
4676+
<blockquote><pre>y = <strong>sample</strong>(u, c)</pre></blockquote>
46764677
<h4>Description</h4>
4677-
<p>Returns true and triggers time events at time instants
4678-
<code>&quot;start + i*interval&quot; (i=0, 1, ...)</code>.
4678+
<p>Returns either:
4679+
<ul>
4680+
<li>true and triggers time events at time instants <code>&quot;start + i*interval&quot; (i=0, 1, ...)</code>, or</li>
4681+
<li>a clocked variable y that has c as associated clock and has the value of the left limit of u when c is active (that is the value of u just before the event of c is triggered)</li>
4682+
</ul>
46794683
During continuous integration the operator returns always
46804684
false. The starting time &quot;start&quot; and the sample
46814685
interval &quot;interval&quot; need to be parameter

0 commit comments

Comments
 (0)