www.gusucode.com > control 案例程序 matlab源码代码 > control/CreateTransferFunctionWithOneInputAndTwoOutputsExample.m
%% Create Transfer Function with One Input and Two Outputs % Create the following transfer function model: % % $$H\left( p \right) = \left[ {\begin{array}{*{20}{c}} % {\frac{{p + 1}}{{{p^2} + 2p + 2}}}\\ % {\frac{1}{p}} % \end{array}} \right]$$ % % The model has an input current and two outputs, torque and angular % velocity. % % Specify the numerator and denominator coefficients of the model: Numerator = {[1 1] ; 1}; Denominator = {[1 2 2] ; [1 0]}; %% % Create the transfer function model, specifying the input name, output % names, and variable. H = tf(Numerator,Denominator,'InputName','current',... 'OutputName',{'torque' 'ang. velocity'},... 'Variable','p') %% % Setting the |Variable| property of the model to |'p'| causes the result % to display as a transfer function of the variable _p_.