classdef MyClass < nelson.mixin.Scalar
| Parameter | Description |
|---|---|
| obj | an object of a class deriving from nelson.mixin.Scalar. |
| Parameter | Description |
|---|---|
| obj | a scalar object instance. |
Derive from nelson.mixin.Scalar to declare that a class can only have scalar instances. Concatenating instances of the class into a non-scalar array, with [a b] or [a; b], raises an error with identifier Nelson:class:concatenationScalar.
Use this mixin for objects that represent a single entity and for which an array of objects has no meaning.
classdef Config < nelson.mixin.Scalar
properties
Name = ''
end
end
% a = [Config(), Config()] % errors: objects can only be scalar
| Version | Description |
|---|---|
| 2.0.0 | initial version |