1. 程式人生 > >matlab中false的用法

matlab中false的用法

首先false是邏輯零的簡寫形式

FALSE(N) is an N-by-N matrix of logical zeros. 是NxN邏輯零的矩陣

FALSE(M,N) or FALSE([M,N]) is an M-by-N matrix of logical zeros.是NxM邏輯零的矩陣

FALSE(..., 'like', Y) is an array of logical zeros with the same data type and sparsity as the logical array Y.與Y同類型的邏輯零矩陣

所以:

cands=false(width,height,depth, 'like', skel);意思就是建立cands邏輯零矩陣,大小與skel大小相同