Member of the waveform generation class.
[x, t] = gensig(type, period)
[x, t] = gensig(type, period, duration)
[x, t] = gensig(type, period, duration, interval)
Generates periodic signals.
| Name | Description | ||||||
| type | Specifies the type of signal to generate. type is a string that accepts the following values.
|
||||||
| period | Specifies the period of the signal. period is a real scalar. | ||||||
| duration | Specifies the time duration, in seconds, of the signal. duration is a real scalar. The default is 5. | ||||||
| interval | Specifies the time interval, in seconds, between two samples. interval is a real scalar. The default is 0.015625, or 1/64. |
| Name | Description |
| x | Returns the amplitude of the generated signal. x is a vector. |
| t | Returns the time values of the generated signal. t is a vector. |
[X, T] = gensig('sin', 100, 100, 1)
plot(T, X)