标签:logic atl matlab logical aaa 矩阵 疑问 bsp mat
把逻辑值放入一个已知矩阵,为啥结果是:真就取矩阵的值,假就忽略?
K>> aaaa=randi(10,10,2)
aaaa =
6 3
10 4
6 7
5 2
6 3
8 2
1 2
9 4
2 9
5 5
K>> aaaa==9
ans =
10×2 logical array
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 1
0 0
K>> aaaa(aaaa==9)
ans =
9
9
标签:logic atl matlab logical aaa 矩阵 疑问 bsp mat
原文地址:https://www.cnblogs.com/yibeimingyue/p/9898963.html