size.m
来自「精通matlab7 源码」· M 代码 · 共 31 行
M
31 行
function [n,d]=size(r,x)%SIZE Size for Rational Polynomial Objects. (MM)% SIZE(R) returns [n;d] where n and d are the respective orders% of the numerator and denominator of R.% SIZE(R,1) returns the numerator order.% SIZE(R,2) returns the denominator order.% [n,d]=SIZE(R) returns the numerator and denominator orders in% n and d respectively.% D.C. Hanselman, University of Maine, Orono ME 04469% 3/27/98% Mastering MATLAB 6, Prentice Hall, ISBN 0-13-019468-9no=length(r.n)-1;do=length(r.d)-1;if nargin==1 if nargout<=1 n=[no;do]; else n=no; d=do; endelseif nargin==2 if x==1 n=no; elseif x==2 n=do; else error('Second Argument Must be 1 or 2.') endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?