help-octave
[Top][All Lists]

## Re: test this in matlab for my please

 From: Doug Stewart Subject: Re: test this in matlab for my please Date: Tue, 15 Mar 2016 20:25:48 -0400

On Tue, Mar 15, 2016 at 2:08 PM, Przemek Klosowski 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 are
ans =  10.430
ans =  0.31421
in octave.

clear
s=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
https://lists.gnu.org/mailman/listinfo/help-octave

But you have control.2.8.3
The error is in control.3.0.0
But thanks for the report

--
DAS

reply via email to