The Scalar base class disallows non-scalar instantiation.
Aktualisiert 16. Feb 2015

Lizenz anzeigen

The Scalar base class disallows non-scalar instantiation.

This constraint simplifies class design and avoids the need for
polymorphic arrays (matlab.mixin.Heterogeneous). Cell arrays or structs
may be used to aggregate Scalar objects.

Class Scalar disables construction of object arrays by "(...)" indexing,
by concatenation (cat, vertcat, horzcat), or with the "empty" function.
Scalar-derived classes can only be instantiated as scalars (length-1
objects). Application of array operations to Scalar-derived objects
result in runtime errors.

Zitieren als

Kenneth Johnson (2024). Scalar (, MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2014b
Kompatibel mit allen Versionen
Windows macOS Linux
Mehr zu Construct and Work with Object Arrays finden Sie in Help Center und MATLAB Answers
Tags Tags hinzufügen

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise