1、之前总是有matlab的提示,说要替换,也没有怎么去分析,可以参考一下
https://blog.csdn.net/qq_43571677/article/details/104765771###
2、可以看matlab的英文解释
& Element-wise Logical AND.
A & B is an array whose elements are logical 1 (TRUE) where both A
and B have non-zero elements, and logical 0 (FALSE) where either has
a zero element. A and B must have compatible sizes. In the simplest
cases, they can be the same size or one can be a scalar. Two inputs
have compatible sizes if, for every dimension, the dimension sizes of
the inputs are either the same or one of them is 1.
&& Short-Circuit Logical AND.
A && B is a scalar value that is the logical AND of scalar A and B.
This is a “short-circuit” operation in that MATLAB evaluates B only
if the result is not fully determined by A. For example, if A equals
0, then the entire expression evaluates to logical 0 (FALSE), regard-
less of the value of B. Under these circumstances, there is no need
to evaluate B because the result is already known.
3、总结一下:&是针对array的(vector or matrix等);&& 是针对标量的,是两个数 比较大小,后面的中文翻译是 “短路逻辑”