Why can I add a empty array to a scalar variable, but I cannot add an empty array to a vector?
显示 更早的评论
In MATLAB it is possible to add an empty array to a scalar variable, namely,
>> 5 + []
and this results in an empty array. However, adding an empty array to a vector results in a dimension mismatch, namely,
>> [2 3] + []
namely,
Error using +
Arrays have incompatible sizes for this operation.
Why can I add a empty array to a scalar variable, but I cannot add an empty array to a vector?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!