This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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