function ExportData = exportdata2(LoopData)
%EXPORTDATA2   Temporary support for HG-based export.
%
%   See also SISOTOOL.

%   Author(s): P. Gahinet
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/14 20:18:26 $

ExportData = exportlti('getdata');

%---Add Plant Models
ExportData.DesignModels = struct(...
    'Name',{LoopData.Plant.Name;LoopData.Sensor.Name;LoopData.PreFilter.Name},...
    'Model',{LoopData.Plant.Model;LoopData.Sensor.Model;LoopData.PreFilter.Model});

%---Add Compensator
ExportData.Compensators = struct(...
    'Name',LoopData.Compensator.Name,...
    'Model',zpk(LoopData.Compensator));

%---Add OpenLoopModel
ExportData.OpenLoop = struct(...
    'Name',sprintf('%s_ol',LoopData.SystemName),...
    'Model',abs(getgain(LoopData)) * LoopData.openloop);

%---Add ClosedLoopModel
try
   ExportData.ClosedLoop = struct(...
       'Name',sprintf('%s_cl',LoopData.SystemName),...
       'Model',zpk(LoopData.closedloop(1,1)));
end

ExportData.MatName = 'DesignData';
