📄 vsize.m
字号:
function[n]=vsize(varargin)%VSIZE Returns the sizes of multiple arguments%% VSIZE(X1,X2,... XN) returns the sizes of the input variables.% These are organized in a matrix of size M x N where M is the number% of input variables and M is the maximum number of dimensions.% __________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information% (C) 2001, 2004 J.M. Lilly --- type 'help jlab_license' for details if strcmp(varargin,'--t') vsize_test,returnend for i=1:length(varargin) x=size(varargin{i}); xall{i}=x(:)'; L(i)=length(x);endn=0*ones(length(varargin),max(L));for i=1:length(varargin) index=1:length(xall{i}); n(i,index)=xall{i};endfunction[]=vsize_testx=ones(1,1);y=ones(2,2);z=ones(2,2,3);x=vsize(x,y,z);bool=allall(x==[1 1 0 ; 2 2 0 ;2 2 3]);reporttest('VSIZE', bool)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -