DocumentationHelp Center
Get test results of current spectral mask
results = getSpectralMaskStatus(scope)
example
results = getSpectralMaskStatus(scope) returns the current status of the spectral mask on the spectrum analyzer, scope, in a structure, results.
results
scope
collapse all
This example shows how to add a spectral mask to an existing dsp.SpectrumAnalyzer System object scope and get the status with getSpectralMaskStatus.
dsp.SpectrumAnalyzer
getSpectralMaskStatus
sine = dsp.SineWave('Frequency',[98 100],'SampleRate',1000); sine.SamplesPerFrame = 1024; scope = dsp.SpectrumAnalyzer('SampleRate',sine.SampleRate, ... 'PlotAsTwoSidedSpectrum',false,'ShowLegend',true); hide(scope); scope.SpectralMask.EnabledMasks = 'Upper and lower'; upperMask = [0 -10; 90 -10; 90 30; 110 30; 110 -10; 500 -10]; set(scope.SpectralMask,'UpperMask',upperMask,'LowerMask',-55); for i=1:100 scope(sine() + 0.05*randn(1024,2)); end res = getSpectralMaskStatus(scope)
res = struct with fields: IsCurrentlyPassing: 0 NumPassedTests: 1 NumTotalTests: 33 SuccessRate: 3.0303 FailingMasks: 'Lower' FailingChannels: [1 2] SimulationTime: 101.3760
In the Spectrum Analyzer, you can see the same information in the Spectral Mask panel.
show(scope); release(scope);
Spectrum Analyzer with spectral masks whose status you want to check. Specified by the name of the dsp.SpectrumAnalyzer object.
The results return the current status of the spectral mask with these properties:
IsCurrentlyPassing
Indicator of whether one or more masks are currently passing
1 — All masks are passing
1
0 — One or more masks are failing
0
NumPassedTests
NumTotalTests
SuccessRate
FailingChannels
FailingMasks
'None'
'Upper'
'Lower'
'Upper and lower'
SimulationTime
dsp.SpectrumAnalyzer | getMeasurementsData | SpectrumAnalyzerConfiguration
getMeasurementsData
SpectrumAnalyzerConfiguration
Existe una versión modificada de este ejemplo en su sistema. ¿Prefiere abrir esta versión?
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office