与一个R2016b开始ddition of implicit expansion, some combinations of arguments for basic operations that previously returned errors now produce results. For example, you previously could not add a row and a column vector, but those operands are now valid for addition. In other words, an expression like[1 2] + [1; 2]
previously returned a size mismatch error, but now it executes.
If your code uses element-wise operators and relies on the errors that MATLAB®previously returned for mismatched sizes, particularly within a尝试
/抓住
块,那么您的代码可能不再捕获这些错误。
有关基本数组操作所需的输入尺寸的更多信息,请参见兼容阵列大小用于基本操作.