Sine - Maple Help

DynamicSystems

 Sine
 generate a sinusoidal waveform

 Calling Sequence Sine( ) Sine(yht, f) Sine(yht, f, t0, y0) Sine(yht, f, t0, y0, opts)

Parameters

 yht - (optional) algebraic; height of sine wave; default is 1 f - (optional) algebraic; frequency of sine wave; default is 1 t0 - (optional) algebraic; delay to sine; default is 0 y0 - (optional) algebraic; initial value; default is 0 opts - (optional) equation(s) of the form option = value; specify options for the Sine command

Options

 • discrete = truefalse

Specifies that the output is a Vector containing samples of the waveform. Elements of the Vector are samples of the waveform. The number of elements in the Vector is given by samplecount. The i-th element corresponds to a sample at time t=(i-1)*sampletime. The default is the value of discrete in DynamicSystems[SystemOptions].

 • samplecount = posint

Specifies the number of samples in the output Vector. It is used with the discrete option. The default is the value of samplecount in DynamicSystems[SystemOptions].

 • sampletime = positive

Specifies the time between samples in the output Vector. It is used with the discrete option. The default is the value of sampletime in DynamicSystems[SystemOptions].

 • hertz = truefalse

Specifies that frequency is in hertz (cycles/second); otherwise frequency is in radians/second. The default is the value of hertz in DynamicSystems[SystemOptions].

Description

 • The Sine command generates a periodic triangular waveform.
 • By default, Sine returns an expression representing the waveform. If the option discrete is assigned true, Sine returns a Vector of data points.
 • The optional parameter yht specifies the height of the signal. Its default value is one.
 • The optional parameter f specifies the frequency of the waveform. The default is one. The units of f are determined by the keyword parameter hertz.
 • The optional parameter t0 specifies the start time of the waveform. Its default value is zero.
 • The optional parameter y0 specifies the initial value. Its default value is zero.

Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$
 > $\mathrm{Sine}\left(\right)$
 $\left\{\begin{array}{cc}{0}& {t}{<}{0}\\ {\mathrm{sin}}{}\left({t}\right)& {\mathrm{otherwise}}\end{array}\right\$ (1)
 > $\mathrm{Sine}\left(\mathrm{yht},f,\mathrm{t0},\mathrm{y0}\right)$
 $\left\{\begin{array}{cc}{\mathrm{y0}}& {t}{<}{\mathrm{t0}}\\ {\mathrm{y0}}{+}{\mathrm{yht}}{}{\mathrm{sin}}{}\left({f}{}\left({-}{\mathrm{t0}}{+}{t}\right)\right)& {\mathrm{otherwise}}\end{array}\right\$ (2)
 > ${\mathrm{Sine}\left(\mathrm{discrete}=\mathrm{true}\right)}^{\mathrm{%T}}$
 $\left[\begin{array}{cccccccccc}{0.}& {0.8414709848}& {0.9092974268}& {0.1411200081}& {-0.7568024953}& {-0.9589242747}& {-0.2794154982}& {0.6569865987}& {0.9893582466}& {0.4121184852}\end{array}\right]$ (3)
 > $\mathrm{plot}\left(\mathrm{Sine}\left(1,\frac{3}{2},0,0\right),t=0..9.5\right)$