view m-toolbox/classes/@rational/respCore.m @ 19:69e3d49b4b0c database-connection-manager

Update ltpda_uo.fromRepository
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% RESPCORE returns the complex response of one rational object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: RESPCORE returns the complex response of one rational object
%              as a data-vector. This function should only be used by the
%              resp method of the ltpda_tf class.
%
% CALL:        r = respCore(obj, f);
%
% VERSION:     $Id: respCore.m,v 1.4 2010/03/15 15:49:53 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function r = respCore(varargin)
  
  %%% Get Inputs
  obj = varargin{1};
  f   = varargin{2}; % Row vector

  %%% Compute response
  s = 2*pi*1i*f;
  numr = polyval(obj.num, s);
  denr = polyval(obj.den, s);
  r = numr./denr; % Row vector
  
end