To connect MATLAB® to a virtual world and to interact with that virtual world through the MATLAB command-line interface, you need to create vrworld and vrnode objects. A virtual world is defined by a VRML file with the extension .wrl.
After you create a virtual world, you can create a vrworld object. This procedure uses the virtual world vrmount.wrl as an example.
myworld = vrworld('vrmount.wrl')
The MATLAB Command Window displays output like
myworld = vrworld object: 1-by-1 VR Car in the Mountains (matlabroot/toolbox/sl3d/vrdemos/vrmount.wrl)
The MATLAB Command Window displays the messages
Closed, associated with 'C:matlabroot\toolbox\sl3d\sl3ddemos\vrmount.wrl'. Visible for local viewers. No clients are logged on.
The vrworld object myworld is associated with the virtual world vrmount.wrl. You can think of the variable myworld as a handle to the vrworld object stored in the MATLAB workspace.
Your next step is to open a virtual world using the vrworld object. See Open a Virtual World with MATLAB.