Main Content

vrnode/setfield

(To be removed) Change field value of vrnode object

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

Syntax

x = setfield(vrnode_object,'fieldname','fieldvalue')

Arguments

vrnode_object

Name of a vrnode object representing the node to be changed.

fieldname

Name of the vrnode object field whose values you want to set.

fieldvalue

Value of fieldname.

Description

x = setfield(vrnode_object,'fieldname','fieldvalue')changes the specified field of the vrnode object to the specified value. You can specify multiple field names and field values in one line of code by grouping them in pairs. For example, x = setfield(vrnode_object, 'fieldname1', 'fieldvalue1', 'fieldname2', 'fieldvalue2', ...).

Note that field names are case sensitive, while property names are not.

Note

The dot notation is the preferred method for accessing nodes. For example:

vrnode_object.fieldname=fieldvalue; 

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrnode/setfield 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.