Main Content


(To be removed) Remove all closed virtual worlds from memory

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




The vrclear function removes from memory all virtual worlds that are closed and invalidates all vrworld objects related to them. This function does not affect open virtual worlds. Open virtual worlds include those loaded from the Simulink® interface. You use this command to

  • Ensure that the maximum amount of memory is freed before a memory-consuming operation takes place.

  • Perform a general cleanup of memory.

The vrclear('-force') command removes all virtual worlds from memory, including worlds opened from the Simulink interface.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrclear 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.