ratpolyval.m
来自「matlab7.0这本书的源代码」· M 代码 · 共 13 行
M
13 行
function out=ratpolyval(num,den,x)
%RATPOLYVAL Evaluate Rational Polynomial.
% RATPOLYVAL(Num,Den,X) evaluates the rational polynomial, whose
% numeraotr and denominator coefficients are given by the vectors
% Num and Den respectively, at the points given in X.
if ~isnumeric(num) || ~isnumeric(den)
error('Num and Den Must be Numeric Vectors.')
end
num=reshape(num,1,[]); % make num into a row vector
den=reshape(den,1,[]); % make den into a row vector
out=polyval(num,x)./polyval(den,x);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?