help-octave
[Top][All Lists]

## Re: test this in matlab for my please

 From: Nicholas Jankowski Subject: Re: test this in matlab for my please Date: Fri, 11 Mar 2016 13:00:46 -0500

On Fri, Mar 11, 2016 at 12:41 PM, Doug Stewart wrote:

2016-03-11 12:28 GMT-05:00 Doug Stewart :
Would someone kindly run this in matlab and post the results for me.
Thanks

s=tf('s')
sys=1/s
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

sys=1/(s^2)
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

sys=1/(s*(s+1))
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

--
DAS

--
DAS

no errors this time:

>>
s=tf('s')
sys=1/s
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

sys=1/(s^2)
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

sys=1/(s*(s+1))
c2d(sys,.1,'zoh')
c2d(sys,.1,'matched')
c2d(sys,.1,'tustin')

s =

s

Continuous-time transfer function.

sys =

1
-
s

Continuous-time transfer function.

ans =

0.1
-----
z - 1

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.1001
------
z - 1

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.05 z + 0.05
-------------
z - 1

Sample time: 0.1 seconds
Discrete-time transfer function.

sys =

1
---
s^2

Continuous-time transfer function.

ans =

0.005 z + 0.005
---------------
z^2 - 2 z + 1

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.005003 z + 0.005003
---------------------
z^2 - 2 z + 1

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.0025 z^2 + 0.005 z + 0.0025
-----------------------------
z^2 - 2 z + 1

Sample time: 0.1 seconds
Discrete-time transfer function.

sys =

1
-------
s^2 + s

Continuous-time transfer function.

ans =

0.004837 z + 0.004679
----------------------
z^2 - 1.905 z + 0.9048

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.004761 z + 0.004761
----------------------
z^2 - 1.905 z + 0.9048

Sample time: 0.1 seconds
Discrete-time transfer function.

ans =

0.002381 z^2 + 0.004762 z + 0.002381
------------------------------------
z^2 - 1.905 z + 0.9048

Sample time: 0.1 seconds
Discrete-time transfer function.