%% Display Fixed-Point Signals
% Create a dsp.LogicAnalyzer object with four channels. Call modifyDisplayChannel to set the radix of each of the channels. Run the scope in a loop to display the waves.

scope = dsp.LogicAnalyzer('NumInputPorts',4,'DisplayChannelFormat','Digital');
scope.TimeSpan = 12;

modifyDisplayChannel(scope,1,'Name','Index','Radix','Unsigned decimal'); 
modifyDisplayChannel(scope,2,'Name','Fi_hex','Radix','Hexadecimal'); 
modifyDisplayChannel(scope,3,'Name','Fi_bin','Radix','Binary'); 
modifyDisplayChannel(scope,4,'Name','Fi_actual','Radix','Signed decimal'); 

for ii = 1:20 
    fival = fi((ii-1)/16,0,4,4); 
    scope(ii,fival,fival,fival); 
end

%
% Copyright 2012 The MathWorks, Inc.