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

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

[Octave-bug-tracker] [bug #58240] Function tf2ss in Octave returns wrong


From: anonymous
Subject: [Octave-bug-tracker] [bug #58240] Function tf2ss in Octave returns wrong result (in Matlab same function works OK)
Date: Sat, 25 Apr 2020 10:59:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36 Edg/81.0.416.64

URL:
  <https://savannah.gnu.org/bugs/?58240>

                 Summary: Function tf2ss in Octave returns wrong result (in
Matlab same function works OK)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 25 Apr 2020 02:59:44 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Aleksandar
        Originator Email: address@hidden
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

As a student I am using tf2ss(num,den) in signal conversion from transfer
function to a state space matrix and we have done it on paper and later on
using software. Example code is:

close all; clear all; clc;
num = [1 4]; den = [1 4 3];
[A1, B1, C1, D1] = tf2ss(num, den);

it returns

A1 =
   4.4409e-16   3.0000e+00
  -1.0000e+00  -4.0000e+00
B1 = -4.000   1.0000
C1 = 0  1

(this one is not a correct answer)

Matlab, with same code returns

A1 = -4   3
      1   0
B1 =  1   0
C1 =  1   4

(this one is the same as we did on paper)

Maybe this is useful to you, so you can fix that.
Regards






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58240>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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