Main Content

Plot Signals from the Command Line

You can plot signals in the Signal Analyzer app by calling the app in the command line.

Create a three-channel random signal sampled for 1 second at 1 kHz. Plot the signal in Signal Analyzer.

signalAnalyzer(randn(1000,3),'SampleRate',1e3)

Use Display Grid on the Display tab to open an empty display. Select the new display and click Spectrum. Create a two-channel sinusoidal signal sampled for 1 second at 100 Hz. The sinusoids have frequencies of 5 Hz and 7 Hz. Plot the signal in the new display.

signalAnalyzer(sin(2*pi*[5 7].*(0:100)'/100),'SampleRate',100)

Select the display with the three random signals. Remove the random signals from the display by clearing the check boxes next to their names. Click Time-Frequency. Create a quadratic chirp sampled for 5 seconds at 600 Hz. The chirp has an initial frequency of 60 Hz that increases to 240 Hz by the end of the measurement. Plot the chirp.

signalAnalyzer(chirp(0:1/600:5,60,5,240,'quadratic'),'SampleRate',600)

See Also

Apps

Functions

Related Examples

More About