的指令,如A = [1 2 3; 4 5 6; 7 8 9], B = logical(eye(3)) B = 1 0 0 0 1 0 0 0 1A(B)ans = 1 5 9右键应该是取消,你选定之后再回车试试;/255是除以255,用来归一化的.因为所有数值都是0-255之间的.0.4是缩放的比例,把图象缩小的系数.