vcolon.m
来自「JLAB is a set of Matlab functions I have」· M 代码 · 共 32 行
M
32 行
function[varargout]=vcolon(varargin)%VCOLON Condenses its arguments, like X(:).%% [Y1,Y2, ... YN]=VCOLON(X1,X2, ... XN) is equivalent to % % Y1=X1(:); Y2=X2(:); ... YN=XN(:); %% VCOLON(X1,X2,...XN) with no output arguments overwrites the % original input variables.% __________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information% (C) 2000, 2004 J.M. Lilly --- type 'help jlab_license' for details if strcmp(varargin{1}, '--t') vcolon_test,returnend for i=1:nargin x=varargin{i}; varargout{i}=x(:);endeval(to_overwrite(nargin));function[]=vcolon_testx=[1 3; 2 4];y=x;vcolon(x,y);reporttest('VCOLON ', all(x==[1:4]'&y==[1:4]'))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?