DSP Blockset | ![]() ![]() |
Example: Creating Signals with the Sine Wave Block
The Sine Wave block dialog box contains the following key parameters.
In the model below, a Sine Wave block generates a frame-based (multichannel) matrix containing three independent signals:
Each channel has a frame size of 64 samples. The three signals are summed point-by-point by a Matrix Sum block, and exported to the workspace.
To build the model, set the Sum along parameter of the Matrix Sum block to Rows, and make the following parameter settings in the Sine Wave block:
[1 3 2]
. This specifies the amplitudes for three independent sinusoids (and therefore dictates a three-column output).
[100 250 500]
. This specifies the frequency for each of the output sinusoids.
1/5000
. (This is ten times the highest sinusoid frequency, and so satisfies the Nyquist criterion.)
64
. This specifies a frame size of 64 for all sinusoids (and therefore dictates a 64-row output).
After running the model, you can look at a portion of the resulting summed sinusoid by typing
See Multichannel Signals for more information about the representation of sample-based and frame-based data.
![]() | Creating Signals Using Signal Generator Blocks | Creating Signals Using the Signal From Workspace Block | ![]() |