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.

isVisible

Determine visibility of scope

Syntax

visibility = isVisible(scope)

Description

example

visibility = isVisible(scope) returns the visibility of the System object™ scope as logical, with 1 (true) for visible.

Examples

collapse all

Create a sine wave signal and view it in the scope.

Fs = 1000;  % Sampling frequency
signal = dsp.SineWave('Frequency',50,'SampleRate',Fs,'SamplesPerFrame',100);
scope = dsp.TimeScope(1,Fs,'TimeSpan',0.25,'YLimits',[-1 1]);
for ii = 1:2
     xsine = signal();
     scope(xsine)
end

Hide the scope window.

if(isVisible(scope))
    hide(scope)
end

Show the scope window.

if(~isVisible(scope))
    show(scope)
end

Clean up workspace variables.

clear scope Fs sine ii xsine

Input Arguments

collapse all

Scope System object whose visibility you want to query.

Example: myScope = dsp.SpectrumAnalyzer; visibility = isVisible(myScope)

Example: myTS = dsp.TimeScope; visibility = isVisible(myTS)

Output Arguments

collapse all

If the scope display is showing, the isVisible function returns 1 (true). Otherwise, the function returns 0 (false).

Introduced in R2016b