No BSD License  

Highlights from
UWB Fixed-Point Model (Multiband OFDM)

image thumbnail

UWB Fixed-Point Model (Multiband OFDM)

by

 

04 Mar 2004 (Updated )

Ultrawideband (UWB) multiband OFDM physical layer with fixed-point transmitter/receiver modeling.

show_data_type_overrides(sys)
function overridesUsed = show_data_type_overrides(sys)
% Known limitation: if model is saved with overrides on,
% the color switching does not work properly.
% Make sure you save with all blocks using local settings (orange).

fixedPtColor = 'orange';
doublesColor = 'green';

% Use root system if no argument passed.
if nargin==0
    sys = bdroot;
end

% For blocks that use local settings, reset to default color.
blks = find_system(sys, 'LookUnderMasks', 'all', 'DataTypeOverRide_Compiled', 'UseLocalSettings');
for n = 1:length(blks)
    blk = blks{n};
    ud = get_param(blk, 'userdata');       
    if ~isempty(ud) && isfield(ud, 'BackgroundColor')
        ud.BackgroundColor = fixedPtColor;        
        set_param(blk, 'BackgroundColor', ud.BackgroundColor);
        set_param(blk, 'userdata', ud);
    end
end

% Check for four data type overrides.
overrides = {'ScaledDoubles', 'TrueDoubles', 'TrueSingles', 'ForceOff'};
overridesUsed = false;
for i=1:length(overrides)

  % Test for each override.
  override = overrides{i};
  
  % Display subsystems that have override set.
  sysOverride = find_system(sys, 'LookUnderMasks', 'all', 'DataTypeOverride', override);
  if ~isempty(sysOverride)
      overridesUsed = true;
      disp(sprintf('\n'));
      disp('Data type overrides:');
      for n = 1:length(sysOverride)
          disp([sysOverride{n} ' (' override ')']);
      end
  end
  
  % Set block background color to green, for any orange block affected.
  sysOverrideComp = find_system(sys, 'LookUnderMasks', 'all', 'DataTypeOverride_Compiled', override);  
  for n=1:length(sysOverrideComp)
      blk = sysOverrideComp{n};
      col = get_param(blk, 'BackgroundColor');
      if isequal(col, fixedPtColor)
          set_param(blk, 'BackgroundColor', doublesColor);
          ud.BackgroundColor = col;
          set_param(blk, 'userdata', ud);
      end
          
  end
    
end  

Contact us