Main Content

isvalid

Class: vrfigure

(To be removed) Check validity of vrfigure object handles

vrfigure.isvalid will be removed in a future release. For more information, see Version History.

Syntax

valid_handles = isvalid(vrfigure_vector)

Description

valid_handles = isvalid(vrfigure_vector) detects whether the vrfigure handles are valid.

Input Arguments

expand all

Virtual reality figure vector, specified as a vrfigure object.

Output Arguments

expand all

Virtual reality figure image, captured as a logical array. The array that contains a 1 where the vrfigure handles are valid and returns a 0 where they are not.

Examples

expand all

Check whether the figure handles of the vrfigure object are valid. The first check shows that the figure handle is valid, but the second check shows that the handle is invalid because the figure is closed.

myworld = vrview('vrpend');
f = vrfigure(myworld);
firstCheck = isvalid(f)
firstCheck = logical
   1

close(f)

Figure Inverted Pendulum contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

secondCheck = isvalid(f)
secondCheck = logical
   0

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The isvalid will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.