|
From: | Nicholas Jankowski |
Subject: | Re: test this in matlab for my please |
Date: | Wed, 16 Mar 2016 14:06:06 -0400 |
1 more test :-)On Tue, Mar 15, 2016 at 8:25 PM, Doug Stewart <address@hidden> wrote:On Tue, Mar 15, 2016 at 2:08 PM, Przemek Klosowski <address@hidden> wrote:_______________________________________________On 03/15/2016 12:07 PM, Doug Stewart wrote:
One more test the 2 values printed should be close to 1 but they areans = 10.430ans = 0.31421in octave.
clears=tf('s')sys=(1/s)sys=sys*1/(s+1)[y t x]=impulse(sys,5);y(length(y))sys2=ss(sys);[ y2 t2 x2]=impulse(sys2,5);y2(length(y2))
With latest Octave on Fedora 23 I get 2 values close to 1:
GNU Octave, version 4.0.0
...
Octave was configured for "x86_64-redhat-linux-gnu".
...
Package | Version | Installation directory
--------------+---------+-----------------------
control | 2.8.3 | /usr/share/octave/packages/control-2.8.3
...
octave:21> clear
octave:22> s=tf('s')
Transfer function 's' from input 'u1' to output ...
y1: s
Continuous-time model.
octave:23> sys=(1/s)
Transfer function 'sys' from input 'u1' to output ...
1
y1: -
s
Continuous-time model.
octave:24> sys=sys*1/(s+1)
Transfer function 'sys' from input 'u1' to output ...
1
y1: -------
s^2 + s
Continuous-time model.
octave:25> [y t x]=impulse(sys,5);
octave:26> y(length(y))
ans = 0.99326
octave:27> sys2=ss(sys);
octave:28> [ y2 t2 x2]=impulse(sys2,5);
octave:29> y2(length(y2))
ans = 0.99326
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
But you have control.2.8.3The error is in control.3.0.0
But thanks for the reportclears=tf('s')sys=(1/s)sys1=sys*1/(s+1)[y t x]=impulse(sys,5);y(1)[y t x]=step(sys,5);y(2)[y t x]=impulse(sys1,5);y(1)[y t x]=step(sys1,5);y(2)[y t x]=impulse(1/(s+1),5);y(1)[y t x]=step(1/(s+1),5);y(2)I getans = 1.0000ans = 0.0050000ans = 0.048374ans = 0.0048374ans = 0.95163ans = 0.095163
[Prev in Thread] | Current Thread | [Next in Thread] |