Main Content

wnet.Node Class

R2026b

Namespace: wnet

Implement custom wireless node

Since R2026a

Description

Use the wnet.Node base class to implement a custom wireless node in a subclass.

The wnet.Node class is a handle class.

Class Attributes

Abstract
true

For information on class attributes, see Class Attributes.

Note

You can invoke the wnet.Node constructor from the constructor of its subclass to set the Position and Name properties using name-value arguments. For example, when you pass Position=[100 100 0; 5000 100 0] and Name=["wnode1","wnode2"], the constructor creates two subclass objects, one with the name "wnode1" positioned at [100 100 0], and the other with the name "wnode2" positioned at [5000 100 0]. The number of rows in the Position argument determines the number of subclass objects created. If you create N nodes but supply M names, where M is greater than N, the constructor uses only the first N names. If M is less than N, the constructor uses default names for the remaining (NM) nodes.

Properties

expand all

Current node position in 3-D Cartesian coordinates, specified as a three-element numeric row vector or an N-by-3 matrix. The units are in meters.

Note

Starting in R2026b, the Position property accepts an N-by-3 matrix to create multiple nodes simultaneously, and the Name property accepts a vector of strings or cell array of character vectors to assign names to multiple nodes. In R2026a, the Position property accepts only a three-element numeric row vector for creating a single node, and the Name property accepts only a string scalar or character vector.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Node identifier, represented as a positive integer. The class assigns ID values incrementally, starting from 1.

Attributes:

GetAccess
public
SetAccess
private

Data Types: double

Name of the wireless node, specified as a character vector, string scalar, cell array of character vectors, or string array. You can set the value of this property only within the subclasses of wnet.Node. The default value of this property is of the form NodeID, where ID refers to the value of the ID property. For example, if the value of ID is 3, the default value of Name is Node3.

Note

Starting in R2026b, the Position property accepts an N-by-3 matrix to create multiple nodes simultaneously, and the Name property accepts a vector of strings or cell array of character vectors to assign names to multiple nodes. In R2026a, the Position property accepts only a three-element numeric row vector for creating a single node, and the Name property accepts only a string scalar or character vector.

Attributes:

GetAccess
public
SetAccess
protected

Data Types: string | char

Node mobility model, represented as an object of a subclass of wnet.Mobility class. You can set the value of this property only within the subclasses of wnet.Node.

Attributes:

GetAccess
public
SetAccess
protected

Node velocity in 3-D Cartesian coordinates, represented as a three-element numeric row vector. The units are in meters per second. You can set the value of this property only within the subclasses of wnet.Node.

Attributes:

GetAccess
public
SetAccess
protected

Data Types: double

Methods

expand all

More About

expand all

Version History

Introduced in R2026a

expand all