comparison scripts/control/tf2sys.m @ 3346:8dd4718801fd

[project @ 1999-11-09 18:18:12 by jwe]
author jwe
date Tue, 09 Nov 1999 18:18:37 +0000
parents f7e4a95916f2
children 69b167451491
comparison
equal deleted inserted replaced
3345:c7ed52f51470 3346:8dd4718801fd
13 # for more details. 13 # for more details.
14 # 14 #
15 # You should have received a copy of the GNU General Public License 15 # You should have received a copy of the GNU General Public License
16 # along with Octave; see the file COPYING. If not, write to the Free 16 # along with Octave; see the file COPYING. If not, write to the Free
17 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 17 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18 18
19 ## -*- texinfo -*-
20 ## @deftypefn {Function File } { @var{sys} = } tf2sys( @var{num}, @var{den} @{, @var{tsam}, @var{inname}, @var{outname} @})
21 ## build system data structure from transfer function format data
22 ##
23 ## @strong{Inputs}
24 ## @table @var
25 ## @item num, den
26 ## coefficients of numerator/denominator polynomials
27 ## @item tsam
28 ## sampling interval. default: 0 (continuous time)
29 ## @item inname, outname
30 ## input/output signal names; may be a string or list with a single string
31 ## entry.
32 ## @end table
33 ##
34 ## @strong{Outputs}
35 ## @var{sys} = system data structure
36 ##
37 ## @strong{Example}
38 ## @example
39 ## octave:1> sys=tf2sys([2 1],[1 2 1],0.1);
40 ## octave:2> sysout(sys)
41 ## Input(s)
42 ## 1: u_1
43 ## Output(s):
44 ## 1: y_1 (discrete)
45 ## Sampling interval: 0.1
46 ## transfer function form:
47 ## 2*z^1 + 1
48 ## -----------------
49 ## 1*z^2 + 2*z^1 + 1
50 ## @end example
51 ## @end deftypefn
52
19 function outsys = tf2sys(num,den,tsam,inname,outname) 53 function outsys = tf2sys(num,den,tsam,inname,outname)
20 #
21 # sys = tf2sys(num,den{,tsam,inname,outname})
22 # build system data structure from transfer function format data
23 # inputs:
24 # num, den: coefficients of numerator/denominator polynomials
25 # tsam: sampling interval. default: 0 (continuous time)
26 # inname, outname: input/output signal names (string variables)
27 # outputs: sys = system data structure
28
29 # Written by R. Bruce Tenison July 29, 1994 54 # Written by R. Bruce Tenison July 29, 1994
30 # Name changed to TF2SYS July 1995 55 # Name changed to TF2SYS July 1995
31 # updated for new system data structure format July 1996 56 # updated for new system data structure format July 1996
32 57
33 save_val = implicit_str_to_num_ok; 58 save_val = implicit_str_to_num_ok;