double.m

来自「精通matlab7 源码」· M 代码 · 共 23 行

M
23
字号
function [n,d]=double(r)%DOUBLE Extract Numerical Data From Rational Polynomial Object. (MM)% DOUBLE(R) returns a matrix with the numerator of R in% the first row and the denominator in the second row.% [N,D]=DOUBLE(R) extracts the numerator N and denominator D% from the rational polynomial object R.% D.C. Hanselman, University of Maine, Orono ME 04469% 3/30/98% Mastering MATLAB 6, Prentice Hall, ISBN 0-13-019468-9if nargout<=1 & length(r.d)>1   nlen=length(r.n);   dlen=length(r.d);   n=zeros(1,max(nlen,dlen));   n=[mmpadd(n,r.n);mmpadd(n,r.d)];elseif nargout<=1	n=r.n;else % nargout==2	n=r.n;	d=r.d;end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?