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