Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation on the sample()-operator to include its use for clocked discrete-time conversion #4475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ModelicaReference/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4669,18 +4669,22 @@
extends ModelicaReference.Icons.Information;
annotation (Documentation(info="<html>
<p>
Trigger time events
Trigger time events, or convert variables to clocked discrete-time domain
</p>
<h4>Syntax</h4>
<blockquote><pre><strong>sample</strong>(start, interval)</pre></blockquote>
<blockquote><pre>y = <strong>sample</strong>(u, c)</pre></blockquote>
<h4>Description</h4>
<p>Returns true and triggers time events at time instants
<code>&quot;start + i*interval&quot; (i=0, 1, ...)</code>.
<p>Returns either:
<ul>
<li>true and triggers time events at time instants <code>&quot;start + i*interval&quot; (i=0, 1, ...)</code>, or</li>
<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>
</ul>
During continuous integration the operator returns always
false. The starting time &quot;start&quot; and the sample
interval &quot;interval&quot; need to be parameter
expressions and need to be a subtype of Real or Integer.
</p>

Check warning on line 4687 in ModelicaReference/package.mo

View workflow job for this annotation

GitHub Actions / html_documentation_checks

inserting implicit <p>

Check warning on line 4687 in ModelicaReference/package.mo

View workflow job for this annotation

GitHub Actions / html_documentation_checks

trimming empty <p>
<h4>Examples</h4>
<blockquote><pre><strong>model</strong> Sampling
Integer i;
Expand Down
Loading