Main Content

vrworld/close

(To be removed) Close virtual world

vrworld/close will be removed in a future release. For more information, see Version History.

Syntax

close(vrworld_object)

Arguments

vrworld_object

A vrworld object representing the virtual world.

Description

This method changes the virtual world from an opened to a closed state:

  • If the world was opened more than once, you must use an appropriate number of close calls before the virtual world closes.

  • If vrworld_object is a vector of vrworld objects, all associated virtual worlds close.

  • If the virtual world is already closed, close does nothing.

Opening and closing virtual worlds is a mechanism of memory management. When the system needs more memory and the virtual world is closed, you can discard its contents at any time.

Generally, you should close a virtual world when you no longer need it. This allows you to reuse the memory it occupied. The vrworld objects associated with this virtual world stay valid after it is closed, so the virtual world can be opened again without creating a new vrworld object.

Examples

myworld = vrworld('virtual world object name')
open(myworld)
close(myworld)

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrworld/close 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.