octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49295] [octave forge] (control) tf object giv


From: Doug Stewart
Subject: [Octave-bug-tracker] [bug #49295] [octave forge] (control) tf object gives wrong results with impulse (and initial)
Date: Mon, 5 Mar 2018 21:30:12 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36

Follow-up Comment #1, bug #49295 (project octave):

This can be closed now.
the fix is in control-3.1.0

this works.

clear
% Impulse response test
  t=linspace(0,5,51); % time vector
% create transfer function
  H=tf(1,[1 1]);
% impulse response - analytic expression
  ht=exp(-t)';
% impulse response - numerical
  ht_num=impulse(H,5,0.1);
% difference (should be close to eps) but is not !
 err=ht - ht_num;

%% Then repeat but with state-space object
  Hss=ss((tf(1,[1 1]))); % create state-space object
% numerical simulation
  ht_num_ss=impulse(Hss,5,0.1);
% difference is as expected
  err_ss=ht - ht_num_ss


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49295>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]