TFCHK Dded
TFCHK Dded
(/tools/hpmatlab/toolbox/signal/tfchk.m)
Function Synopsis
[numc,denc] = tfchk(num,den)
Help text
TFCHK
Cross-Reference Information
This function calls
disp
/tools/hpmatlab/toolbox/matlab/general/disp.m
end
/tools/hpmatlab/toolbox/matlab/lang/end.m
error
/tools/hpmatlab/toolbox/matlab/lang/error.m
function
/tools/hpmatlab/toolbox/matlab/lang/function.m
if
/tools/hpmatlab/toolbox/matlab/lang/if.m
isempty
/tools/hpmatlab/toolbox/matlab/ops/isempty.m
return
/tools/hpmatlab/toolbox/matlab/lang/return.m
size
/tools/hpmatlab/toolbox/matlab/general/size.m
zeros
/tools/hpmatlab/toolbox/matlab/elmat/zeros.m
tf2zp
/tools/hpmatlab/toolbox/signal/tf2zp.m
for
(/tools/hpmatlab/toolbox/matlab/lang/for.m)
Help text
FOR
function
(/tools/hpmatlab/toolbox/matlab/lang/function.m)
Help text
FUNCTION Function M-files.
New functions may be added to MATLAB's vocabulary if they
are expressed in terms of other existing functions. The
commands and functions that comprise the new function must
be put in a file whose name defines the name of the new
function, with a filename extension of '.m'. At the top of
the file must be a line that contains the syntax definition
for the new function. For example, the existence of a file
on disk called STAT.M with:
function [mean,stdev] = stat(x)
n = length(x);
mean = sum(x) / n;
stdev = sqrt(sum((x - mean).^2)/n);
defines a new function called STAT that calculates the
mean and standard deviation of a vector. The variables
within the body of the function are all local variables.
See SCRIPT for procedures that work globally on the workspace.
See also ECHO, SCRIPT.
length
(/tools/hpmatlab/toolbox/matlab/general/length.m)
Help text
LENGTH Number of components of a vector.
LENGTH(X) returns the length of vector X.
to MAX(SIZE(X)).
It is equivalent
if
(/tools/hpmatlab/toolbox/matlab/lang/if.m)
Help text
IF
of
IF I == J
A(I,J) = 2;
ELSEIF ABS(I-J) == 1
A(I,J) = -1;
ELSE
A(I,J) = 0;
END
error
(/tools/hpmatlab/toolbox/matlab/lang/error.m)
Help text
ERROR
end
if nargin==4
% Multivariable systems
[iu,nargin,y]=mulresp('dimpulse',a,b,c,d,n,nargout,0);
if ~iu, if nargout, yout = y; end, return, end
end
end
if (nargin <= 3)&(nargout <= 1),
% Transfer function description
y = dlsim(num,den,[1;zeros(n-1,1)]); % More efficient: uses
FILTER
else
if ~isempty(b), b=b(:,iu); end, d = d(:,iu);
[y,x] = dlsim(a,b,c,d,[1;zeros(n-1,1)]);
end
if nargout==0,
% With no output arguments, plot graph
status = ishold;
stairs([0:n-1],y)
hold on
plot([0,n-1],[0;0],':')
xlabel('No. of Samples')
ylabel('Amplitude')
if ~status, hold off, end
return % Suppress output
end
yout = y;