run this in matlab for me

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

run this in matlab for me

Doug Stewart-4

could someone run this in matlab and show me the answers, please.

z = tf('z',1)
z'          
tf(ss(z)')  

q=z +1
q'
tf(ss(q)')

q=z^3-2*z^2+3*z+7
q'
tf(ss(q)')


Thanks in advance.
--
DASCertificate for 206392

Reply | Threaded
Open this post in threaded view
|

Re: run this in matlab for me

Bhrigu Kansra
I ran above code in MATLAB 2019a
The output was ( I've attached the output in pdf format too)
       -----------------------------------------------------------

z = tf('z',1)
z'          
tf(ss(z)')  

q=z +1
q'
tf(ss(q)')

q=z^3-2*z^2+3*z+7
q'
tf(ss(q)')

-----------------------------------------------------------


z =
 
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  1
  -
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
   z
  ---
  z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


q =
 
  z + 1
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z + 1
  -----
    z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z^2 + z + 2.892e-17
  -------------------
          z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


q =
 
  z^3 - 2 z^2 + 3 z + 7
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7 z^3 + 3 z^2 - 2 z + 1
  -----------------------
            z^3
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7 z^4 + 3 z^3 - 2 z^2 + z + 2.425e-17
  -------------------------------------
                   z^4
 
Sample time: 1 seconds
Discrete-time transfer function.
          -----------------------------------------------------------
Best Regards,
Bhrigu Kansra

>> 

On Thu, Apr 11, 2019 at 11:10 PM Doug Stewart <[hidden email]> wrote:

could someone run this in matlab and show me the answers, please.

z = tf('z',1)
z'          
tf(ss(z)')  

q=z +1
q'
tf(ss(q)')

q=z^3-2*z^2+3*z+7
q'
tf(ss(q)')


Thanks in advance.
--
DASCertificate for 206392


test.pdf (82K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: run this in matlab for me

Doug Stewart-4


On Thu, Apr 11, 2019 at 4:16 PM Bhrigu Kansra <[hidden email]> wrote:
I ran above code in MATLAB 2019a
The output was ( I've attached the output in pdf format too)
       -----------------------------------------------------------

z = tf('z',1)
z'          
tf(ss(z)')  

q=z +1
q'
tf(ss(q)')

q=z^3-2*z^2+3*z+7
q'
tf(ss(q)')

-----------------------------------------------------------


z =
 
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  1
  -
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
   z
  ---
  z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


q =
 
  z + 1
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z + 1
  -----
    z
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z^2 + z + 2.892e-17
  -------------------
          z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


q =
 
  z^3 - 2 z^2 + 3 z + 7
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7 z^3 + 3 z^2 - 2 z + 1
  -----------------------
            z^3
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7 z^4 + 3 z^3 - 2 z^2 + z + 2.425e-17
  -------------------------------------
                   z^4
 
Sample time: 1 seconds
Discrete-time transfer function.
          -----------------------------------------------------------
Best Regards,
Bhrigu Kansra

>> 

On Thu, Apr 11, 2019 at 11:10 PM Doug Stewart <[hidden email]> wrote:

could someone run this in matlab and show me the answers, please.

z = tf('z',1)
z'          
tf(ss(z)')  

q=z +1
q'
tf(ss(q)')

q=z^3-2*z^2+3*z+7
q'
tf(ss(q)')


Thanks in advance.
--
DASCertificate for 206392




Very help-full
thak you


--
DASCertificate for 206392

Reply | Threaded
Open this post in threaded view
|

Re: run this in matlab for me

Doug Stewart-4
In reply to this post by Bhrigu Kansra


On Thu, Apr 11, 2019 at 11:10 PM Doug Stewart <[hidden email]> wrote:

could someone run this in matlab and show me the answers, please.

Thanks in advance.
--
DASCertificate for 206392


One more try .
please run this in Matlab:


q1=((z^3-2*z^2+3*z+7)/(z +13))
aq=q1'
minreal(aq)
aq'
aaq=tf(ss(q1)')
q2=aaq'
minreal(q2)


--
DASCertificate for 206392

Reply | Threaded
Open this post in threaded view
|

Re: run this in matlab for me

siko1056
On Sat, Apr 13, 2019 at 6:02 AM Doug Stewart <[hidden email]> wrote:

One more try .
please run this in Matlab:


q1=((z^3-2*z^2+3*z+7)/(z +13))
aq=q1'
minreal(aq)
aq'
aaq=tf(ss(q1)')
q2=aaq'
minreal(q2)


--
DASCertificate for 206392


I added "z = tf('z',1)" as first line according to an older post by you (https://lists.gnu.org/archive/html/octave-maintainers/2019-04/msg00089.html), this avoid the undefined "z" error.

The output for R2019a is:

z =
 
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


q1 =
 
  z^3 - 2 z^2 + 3 z + 7
  ---------------------
         z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


aq =
 
  7 z^3 + 3 z^2 - 2 z + 1
  -----------------------
       13 z^3 + z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  0.5385 z^3 + 0.2308 z^2 - 0.1538 z + 0.07692
  --------------------------------------------
               z^3 + 0.07692 z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z^3 - 2 z^2 + 3 z + 7
  ---------------------
         z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


aaq =
 
  0.5385 z^4 + 0.2308 z^3 - 0.1538 z^2 + 0.07692 z + 5.406e-19
  ------------------------------------------------------------
                       z^4 + 0.07692 z^3
 
Sample time: 1 seconds
Discrete-time transfer function.


q2 =
 
  5.406e-19 z^4 + 0.07692 z^3 - 0.1538 z^2 + 0.2308 z + 0.5385
  ------------------------------------------------------------
                         0.07692 z + 1
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7.028e-18 z^4 + z^3 - 2 z^2 + 3 z + 7
  -------------------------------------
                 z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


Best,
Kai
Reply | Threaded
Open this post in threaded view
|

Re: run this in matlab for me

Doug Stewart-4


On Sat, Apr 13, 2019 at 4:51 AM Kai Torben Ohlhus <[hidden email]> wrote:
On Sat, Apr 13, 2019 at 6:02 AM Doug Stewart <[hidden email]> wrote:

One more try .
please run this in Matlab:


q1=((z^3-2*z^2+3*z+7)/(z +13))
aq=q1'
minreal(aq)
aq'
aaq=tf(ss(q1)')
q2=aaq'
minreal(q2)


--
DASCertificate for 206392


I added "z = tf('z',1)" as first line according to an older post by you (https://lists.gnu.org/archive/html/octave-maintainers/2019-04/msg00089.html), this avoid the undefined "z" error.

The output for R2019a is:

z =
 
  z
 
Sample time: 1 seconds
Discrete-time transfer function.


q1 =
 
  z^3 - 2 z^2 + 3 z + 7
  ---------------------
         z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


aq =
 
  7 z^3 + 3 z^2 - 2 z + 1
  -----------------------
       13 z^3 + z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  0.5385 z^3 + 0.2308 z^2 - 0.1538 z + 0.07692
  --------------------------------------------
               z^3 + 0.07692 z^2
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  z^3 - 2 z^2 + 3 z + 7
  ---------------------
         z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


aaq =
 
  0.5385 z^4 + 0.2308 z^3 - 0.1538 z^2 + 0.07692 z + 5.406e-19
  ------------------------------------------------------------
                       z^4 + 0.07692 z^3
 
Sample time: 1 seconds
Discrete-time transfer function.


q2 =
 
  5.406e-19 z^4 + 0.07692 z^3 - 0.1538 z^2 + 0.2308 z + 0.5385
  ------------------------------------------------------------
                         0.07692 z + 1
 
Sample time: 1 seconds
Discrete-time transfer function.


ans =
 
  7.028e-18 z^4 + z^3 - 2 z^2 + 3 z + 7
  -------------------------------------
                 z + 13
 
Sample time: 1 seconds
Discrete-time transfer function.


Best,
Kai



Thanks Kai
This verifies that my fixes are working properly.


--
DASCertificate for 206392