www.gusucode.com > fixedpoint 案例源码程序 matlab代码 > fixedpoint/PerformaBitwiseExclusiveOROperationonaRangeofBitsinaMatrExample.m
%% Perform a Bitwise Exclusive OR Operation on a Range of Bits in a Matrix % Copyright 2015 The MathWorks, Inc. %% % Create a fixed-point matrix. a = fi([7,8,1;5,9,5;8,37,2],0,8,0); disp(bin(a)) %% % Perform a bitwise exclusive |OR| operation on the bits of each element % of matrix |a| beginning at position 5 and ending at position 2. c = bitxorreduce(a,5,2)