Axis

Enumeration class for the Cartesian axes x, y, z.

Contents

Description

The only three instances Axis.x, Axis.y, and Axis.z of Axis are used extensively in MaxwellFDS to represent and specify the x-, y-, and z-axis of the Cartesian coordinate system.

Axis is a subclass of Enumerated, so it inherits all the methods of Enumerated. See Enumerated for more details.

Instances

Methods

Below, axis is an instance of Axis.

Example

% Test conversion to integers and strings.
fprintf('# of instances of Axis: %d\n', Axis.count);
for w = Axis.elems
    fprintf('The integer value of Axis.%s is %d\n', char(w), int(w));
end
% Test cyclic permutation.
[p q r] = cycle(Axis.y);
fprintf('The cyclic permutation of [x, y, z] beginning with y is [%s, %s, %s]\n', char(r), char(p), char(q));

See Also

Enumerated