Main Content


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.


valid_handles = isvalid(vrfigure_vector)


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.


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


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

secondCheck = isvalid(f)
secondCheck = logical

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrfigure.isvalid will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks in Unreal Engine Scenario Applications to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Get Started Creating Virtual World with Actors.