repltest.m
来自「刘金琨老师作品」· M 代码 · 共 24 行
M
24 行
function rep=repltest
% REPLTEST Replicate test function. (Utility Function)
% REPLTEST determines which direction Matlab replicates a single
% number using the : operator.
% Author: Craig Borghesani
% 2/17/94
% Copyright (c) 1995-98 by The MathWorks, Inc.
% $Revision: 1.4 $
% perform replicating test with one number
x=5;
v=ones(1,5);
% newx should be a row vector with dimensions 1x5
newx = x(v);
[r,c]=size(newx);
rep=1;
% if r > 1 then matlab is replicating incorrectly
if r>1, rep=0; end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?