functiondampedSine
Return a damped sine chracteristic
Information
Syntax
(x,y) = Plot.Examples.Utilities.dampedSine(freqHz, damping, nPeriod=5, nPoints=500);
Description
This function computes nPoints points x[i], y[i] of a sine-curve
y = exp(-x*damping)*sin(2*pi*freqHz*x)
where the abszissa values x[i] are in the range 0 .. nPeriod*T, where T = 1/freqHz is the period of the sine wave.
Example
With the default options and freqHz=2 Hz and damping=0.8, the following curve is generated:

Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Frequency | freqHz | Frequency of sine wave | |
| Modelica.Units.SI.Damping | damping | Damping coefficient of sine wave | |
| Integer | nPeriod | 5 | Number of periods to show |
| Integer | nPoints | 500 | Number of points |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[nPoints] | x | ||
| Real[nPoints] | y |