function dummy = interpy(Editor,MagData,PhaseData)
%INTERPY  Sets Y coordinate of objects overlayed on Bode plots.

%   Author(s): P. Gahinet
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.4 $ $Date: 2000/08/17 22:16:18 $

% REVISIT
dummy = [];

HG = Editor.HG;

% Convert freq. data to current units
FreqData = unitconv(Editor.Frequency,'rad/sec',Editor.FrequencyUnits);

% Magnitude plot
Handles = [comphandles(Editor,'mag') ; ...
        HG.System(1).Zero ; ...
        HG.System(1).Pole];
X = get(Handles,{'Xdata'});
Y = interp1(FreqData,MagData,cat(1,X{:}));
set(Handles,{'Ydata'},num2cell(Y,2))

if nargin==3
    % Phase plot (except when mag only requested)
    Handles = [comphandles(Editor,'phase') ; ...
            HG.System(2).Zero ; ...
            HG.System(2).Pole];
    X = get(Handles,{'Xdata'});
    Y = interp1(FreqData,PhaseData,cat(1,X{:}));
    set(Handles,{'Ydata'},num2cell(Y,2))
end