www.gusucode.com > fixedpoint 案例源码程序 matlab代码 > fixedpoint/RotateBitsinaVectorLeftExample.m

    %% Rotate Bits in a Vector Left  

% Copyright 2015 The MathWorks, Inc.


%% 
% Create a vector of |fi| objects. 
a = fi([1,2,5,7],0,4,0)
%%
disp(bin(a))  
%% 
% Rotate the bits in vector |a| left 1 bit. 
disp(bin(bitrol(a,1)))