7017
|
1 ## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 |
|
2 ## Auburn University. All rights reserved. |
3430
|
3 ## |
|
4 ## This file is part of Octave. |
|
5 ## |
|
6 ## Octave is free software; you can redistribute it and/or modify it |
7016
|
7 ## under the terms of the GNU General Public License as published by |
|
8 ## the Free Software Foundation; either version 3 of the License, or (at |
|
9 ## your option) any later version. |
3430
|
10 ## |
7016
|
11 ## Octave is distributed in the hope that it will be useful, but |
|
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 ## General Public License for more details. |
3430
|
15 ## |
|
16 ## You should have received a copy of the GNU General Public License |
7016
|
17 ## along with Octave; see the file COPYING. If not, see |
|
18 ## <http://www.gnu.org/licenses/>. |
3430
|
19 |
|
20 ## -*- texinfo -*- |
3500
|
21 ## @deftypefn {Function File} {} tf2sys (@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}) |
5016
|
22 ## Build system data structure from transfer function format data. |
3430
|
23 ## |
|
24 ## @strong{Inputs} |
|
25 ## @table @var |
|
26 ## @item num |
|
27 ## @itemx den |
5016
|
28 ## Coefficients of numerator/denominator polynomials. |
3430
|
29 ## @item tsam |
5016
|
30 ## Sampling interval; default: 0 (continuous time). |
3430
|
31 ## @item inname |
|
32 ## @itemx outname |
5016
|
33 ## Input/output signal names; may be a string or cell array with a single string |
3430
|
34 ## entry. |
|
35 ## @end table |
|
36 ## |
5016
|
37 ## @strong{Output} |
|
38 ## @table @var |
|
39 ## @item sys |
|
40 ## System data structure. |
|
41 ## @end table |
3430
|
42 ## |
|
43 ## @strong{Example} |
|
44 ## @example |
|
45 ## octave:1> sys=tf2sys([2 1],[1 2 1],0.1); |
|
46 ## octave:2> sysout(sys) |
|
47 ## Input(s) |
|
48 ## 1: u_1 |
|
49 ## Output(s): |
|
50 ## 1: y_1 (discrete) |
|
51 ## Sampling interval: 0.1 |
|
52 ## transfer function form: |
|
53 ## 2*z^1 + 1 |
|
54 ## ----------------- |
|
55 ## 1*z^2 + 2*z^1 + 1 |
|
56 ## @end example |
|
57 ## @end deftypefn |
|
58 |
|
59 ## Author: R. Bruce Tenison <btenison@eng.auburn.edu> |
|
60 ## Created: July 29, 1994 |
|
61 ## Name changed to TF2SYS July 1995 |
|
62 ## updated for new system data structure format July 1996 |
4771
|
63 ## name changed to tf Feb 2004 |
3430
|
64 |
4771
|
65 function outsys = tf2sys (varargin) |
7125
|
66 |
7136
|
67 warning ("tf2sys is deprecated. Use tf instead."); |
|
68 outsys = tf (varargin{:}); |
3430
|
69 |
|
70 endfunction |