Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getSpectrumData

Save spectrum data shown in spectrum analyzer

Syntax

spectrumTable = getSpectrumData(scope)

Description

spectrumTable = getSpectrumData(scope) returns the spectrum and spectrogram displayed on the spectrum analyzer along with additional statistics about the spectrum.

Examples

collapse all

Save the spectrum estimation displayed on a spectrum analyzer.

Create a Spectrum Analyzer System object, scope, and generate data.

scope = dsp.SpectrumAnalyzer;
scope(randn(5000,3))

Save data from the last spectrum shown on the spectrum analyzer to a table.

specTable = getSpectrumData(scope)
specTable =

  1x6 table

    SimulationTime       Spectrum        Spectrogram    MinHoldTrace    MaxHoldTrace    FrequencyVector
    ______________    _______________    ___________    ____________    ____________    _______________

    [0]               [1536x3 double]    []             []              []              [1536x1 double]

Input Arguments

collapse all

Spectrum analyzer you want to query. Specify a dsp.SpectrumAnalyzer System object™ or a Spectrum Analyzer Configuration object for a spectrum analyzer block.

Output Arguments

collapse all

A spectrum table is returned containing the following fields:

FieldDescription
SimulationTimeSimulation time
SpectrumPower, power density, or RMS spectrum data
SpectrogramSpectrogram data
MinHoldTraceMinimum hold trace data
MaxHoldTraceMaximum hold trace data
FrequencyVectorFrequency vector

Introduced in R2017b

Was this topic helpful?