Scalar

版本 1.0.0.0 (2.2 KB) 作者: Kenneth Johnson
The Scalar base class disallows non-scalar instantiation.
97.0 次下载
更新时间 2015/2/16

查看许可证

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.

引用格式

Kenneth Johnson (2025). Scalar (https://ww2.mathworks.cn/matlabcentral/fileexchange/49729-scalar), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Construct and Work with Object Arrays 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0