function rthosts_remove

% Create a new real-time host environment collection object
rthosts_obj = simwb.rthosts
% Create a new real-time host environment object
rthostenv_obj = simwb.rthostenv
% Customize the real-time host environment by changing the name and IP
rthostenv_obj.Name = 'RedHawk1'
rthostenv_obj.RTHostNameorIP = '192.168.0.10'
% Add this custom real-time host environment to the collection
rthosts_obj.add(rthostenv_obj)
% Remove this custom real-time host environment from the collection
rthosts_obj.remove('RedHawk1')
rthosts_obj = 

  simwb handle

  Properties:
    NumHosts: 0



rthostenv_obj = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'DefaultName'
    RTHostNameorIP: '127.0.0.1'



rthostenv_obj = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'RedHawk1'
    RTHostNameorIP: '127.0.0.1'



rthostenv_obj = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'RedHawk1'
    RTHostNameorIP: '192.168.0.10'



ans = 

  simwb handle

  Properties:
    NumHosts: 1



ans = 

  simwb handle

  Properties:
    NumHosts: 0